I have a page that goes out to mapquest and gets a result of stores and distances. The issue I am having is since we upgraded to PHP 4.3.3, the way I used to do this (using fopen, etc)does not work. I have updated my code, but using the include/require function, it displays the contents. How can I not display the contents? Below is my code. the bold line is where I have updated my code, the commented out lines above that are the old code.
$realMQpath=”
#$realMQpath=”http://$HTTP_HOST/stores/locator/realMQ”;
$MQIC_path=”$realMQpath/mqinterconnect.cgi”;
$MQTP_path=”$realMQpath/mqtripplus.cgi”;
$BAD_ADDRESS=0;
$AMBIGUITIES=0;
$NOFOUND=0;
$amb=array();
//$stores=array();
$miles = “10”;
$maxshow = “1”;
$locator_fixed = “closestprox=1&closestn=100&screen=find&link=results&country=US”;
$myQuery=”$MQIC_path?$locator_fixed&zip=$zip&miles=$miles&maxshow=$maxshow”;
//$fd= @fopen ( $myQuery, “r”);
//print $myQuery;
//if (!$fd) {
//$status=”Error: Couldn’t complete MAP request. Please try again later.”;
// return;
//} else {
[B]$tmp_result=require($myQuery);[/B]
//echo $tmp_result;
if (!$tmp_result) {
$sErrs=”Error: Couldn’t complete MAP request. Please try again later.”;
} else {
//fclose($fd);
//print “tmp_result =>$tmp_result<= <br>n”;
//exit;
/*
ob_start();
eval( “?> $tmp_result” );
ob_end_clean();
*/
//print “hello”;
//print_r($store_numbers);
}
$this->$stores = $this->fill_store_specs($store_numbers);
} //End function find_stores_by_zip