You are here: Re: Sending a GET request and getting the response using fsockopen. « PHP Programming Language « IT news, forums, messages
Re: Sending a GET request and getting the response using fsockopen.

Posted by Aetherweb on 01/30/07 16:14

Sorted. Thank you.

On Jan 30, 11:50 am, Rik <luiheidsgoe...@hotmail.com> wrote:
> Aetherweb <jeffs...@gmail.com> wrote:
> > Hi,
>
> > I need to use fsockopen to open a connection, send a GET request and
> > read in the response. At the moment I'm trying the following code, but
> > I think it's ignoring the actual URL included in the $request
> > variable.
>
> > $host = "www.myhost.com";
> > $request = "/myurl.php?param1=1&param2=2&param3=3";
>
> > $fp = fsockopen($host, 80, $errno, $errstr, 3.0);
>
> > if ($fp)
> > {
> > # Send the get request then, with timeout...
> > fwrite($fp, "GET / HTTP/1.0\r\n" ."GET $request HTTP/1.0\r\n" .
>
> --
> Rik Wasmus

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация