Click here to Skip to main content
15,892,161 members

Comments by Motherangel (Top 1 by date)

Motherangel 22-Feb-13 7:00am View    
@amarasat,

Please could kindly rewrite the code to use the file_get_contents_curl. I'm having the error failed to open stream and I need to adopt your solution. Here is the code:

global $_english;

$query= ($_english ? 'http://lawrencehartntv2projcet.org/cgi-bin/ntv2_geo2_e.cgi' : 'http://lawrencehartntv2projcet.org/cgi-bin/ntv2_geo2_f.cgi').
'?' . PAR_DIR .'=' . $dir .
'&' . PAR_LATDEG .'=' . $latdeg .
'&' . PAR_LATMIN .'=' . $latmin .
'&' . PAR_LATSEC .'=' . $latsec .
'&' . PAR_LONGDEG .'=' . $longdeg .
'&' . PAR_LONGMIN .'=' . $longmin .
'&' . PAR_LONGSEC .'=' . $longsec;

$response=file($query);

foreach ($response as $value)
{
echo $value;
}
}
?>

This line of code $response=file($query); is retuning the above error. Please help.