PDA

View Full Version : Need help with PHP Direct Evaluation


Scalemotorcars
09-09-2011, 12:47 PM
Im using a 3rd party script that that uses a short PHP code to insert eBay links into a page.

The basic code looks like this.

<?php
require_once($_SERVER['DOCUMENT_ROOT'] . "/phpbay/ebay.php");
phpBayAPI("models", "100", "220", "excluded words", "", false);
?>

If I add the entire code with a PHP Direct Evaluation it actually works but sticks everything above the header for that section and the specific page.

I tried also removing the <?php and ending ?> and it displays the same results.

How can I embed the code example below into the actual page?

Thanks in advance for your help. :D

kh99
09-09-2011, 12:51 PM
Try this:

ob_start();
require_once($_SERVER['DOCUMENT_ROOT'] . "/phpbay/ebay.php");
phpBayAPI("models", "100", "220", "excluded words", "", false);
$output = ob_get_contents();
ob_end_clean();