RE: [PHP] fsockopen
| From: | Christoph Starkmann | Date: | Tue, 26 Mar 2002 12:48:19 +0000 |
| Subject: | RE: [PHP] fsockopen | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-90173@lists.php.net to get a copy of this message | ||
Hi!
> Is $tempPort set ?
Yes... 80 as default...
> > $tempUrl = ereg_replace("http://", "",
> > $url);
> >
> > $fp = fsockopen ($tempUrl, $tempPort, &$errno, &$errstr, 30);
> >
> > if (!$fp)
> > {
> > echo "<br>error opening $url: \$errstr=$errstr,
> \$errno=$errno<br>\n";
> > }
> > else
> > {
> > fputs ($fp, "GET / HTTP/1.0\r\n\r\n");
> > echo "<br>s>>>" . fgets($fp,1024);
> > fclose($fp);
> > }
Cheers...
Kiko
-----
It's not a bug, it's a feature.
christoph starkmann
mailto:kiko@nfq.de
http://www.fh-augsburg.de/~kiko
ICQ: 100601600
-----