I have a weather scrip I am developing and I am having some problems with it returning the info. The script pulls the weather from msnbc and mathches it to variables in my page to display the weather.
Here is the code that I am using to retrieve info from msnbc
function WeatherIndex($tp) {
global $accid, $tp;
$fa = fsockopen("www.msnbc.com", 80, &$num_error, &$str_error, 30);
if(!$fa)
{ print "Weather is not available: $str_error ($num_error)\n"; }
else
{
fputs($fa,"GET /m/chnk/d/weather_d_src.asp?acid=$accid HTTP/1.0\n\n");
$answer=fgets($fa,128);
It takes 5 minutes to load the page.
If I remove the http1.0 it takes 1/2 sec to load the page but it also loads the info in plain text at the top of the page.
can someone help??
If you need to see the entire code let me know.