Reputation: 964
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 ); ?>
Upvotes: 0
Views: 240
Reputation: 3407
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>
Upvotes: 1