help getting web page
| From: | Ed Lazor | Date: | Thu, 29 Jun 2000 20:52:24 +0000 |
| Subject: | help getting web page | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-3887@lists.php.net to get a copy of this message | ||
The following code isn't working properly. Instead of pulling up test.atfantasy.com, it pulls up new.atfantasy.com. They are both virtual domains running on the server. I'm assuming that I need to somehow specify which domain I'm requesting information from. Any ideas?
Thanks =)
ps... if there's another way to do this, I'm all ears hehe I'm trying to pull a web page and store it into a variable with the intention of then mailing it to myself as kind of a status update.
--------------------------------------------------
<?php
print "HERE WE ARE TESTING<br>";
$fp = fsockopen("test.atfantasy.com", 80);
$command = "";
fputs($fp,"GET /$command HTTP/1.0\r\n\r\n");
while(!feof($fp))
echo fgets($fp,1024);
?>