I'm using the following script to try and access a site:
$fp = fopen ("http://www.smallworld.com/crs/home_check_reg.html?username=Username&password=Password", "r");
$file = fread($fp, 10000);
echo $file;
fclose($fp);
I can access the page ok if I use that URL in a browser, but when I try it through PHP with the above code, I get the following "errors":
Warning: fopen("http://www.smallworld.com/crs/home_check_reg.html?username=Username&password=Password","r") - Success in /home/sparks/public_html/tools/baseball/test/sample.php on line 3
Warning: Supplied argument is not a valid File-Handle resource in /home/sparks/public_html/tools/baseball/test/sample.php on line 4
Warning: Supplied argument is not a valid File-Handle resource in /home/sparks/public_html/tools/baseball/test/sample.php on line 6
I have a feeling that the site is checking a cookie on my computer when I try to access it and since the PHP server doesn't have that cookie, then it's having problems. Is there a way around this?