0

Hi i'm trying to add a php code generated by Shoretel Microsite in my Wordpress Custom page.

<?php
    $version = "all";   // "all" includes everything
            // "products" includes only product information

    $style = "2";   // "0" = Use your own Stylesheet
            // "1" = Stylesheet with nav on the left
            // "2" = Stylesheet with nav on the top

    $logo = "us";   // "us" ShoreTel Authorized Reseller
            // "eu" ShoreTel Authorised Partner
?>
<?php echo file_get_contents("http://micro.shoretel.com/www/?v=$version&s=$style&l=$logo&p=" . $_GET["p"]); ?> 

It worked before when i put it in my php file. But now when i add the code, the page won't load... how can i add this code then?

is there a proper way to do this?


<div id="contentRight">

 ***i want to put the code here...***

<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div <?php post_class(); ?> id="post-<?php the_ID(); ?>">
    <h2><?php the_title(); ?></h2>
        <div id="content">
            <?php the_content(); ?>

** someone told me to use ,

wp_remote_get instead of file_get_contents

but how?

<?php wp_remote_get( "http://micro.shoretel.com/www/?v=$version&s=$style&l=$logo&p=" . $_GET["p"], $args ); ?> 

1 Answer 1

1

try an iframe instead. sounds like you are echoing out a full page inside a DIV and breaking the HTML.

for example :

<iframe src='<?php echo "http://micro.shoretel.com/www/?v=$version&s=$style&l=$logo&p=" . $_GET["p"] ?>' ></iframe>
Sign up to request clarification or add additional context in comments.

5 Comments

is the code correct? i'm not very good with php.. but dreamweaver highlights the code as red..
try the above edit - using single quotes around the src attrib value
yeah! it worked, but how im going to customize it, css right?
you would have to override their own CSS styles with a custom style sheet of your own. see stackoverflow.com/questions/217776/how-to-apply-css-to-iframe. vote this answer up if it solved your original question - thanks!
thanks for this alternative solution, now im going to post another question in styling the iframe's content.. i dont have any control to css of the iframe's src.. i'm planning to override the styles.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.