You are here: Re: Try to get a file from a server by PHP « PHP Programming Language « IT news, forums, messages
Re: Try to get a file from a server by PHP

Posted by Philip Ronan on 10/21/05 19:55

"Jamie Davison" wrote:

> I would suggest using CURL whenever possible . .

.... or just file_get_contents() <http://www.php.net/file_get_contents>

NurAzije: If it helps at all, the error you're getting is caused by this
line:

>> $request.="Host=$host\r\n\r\n"

Headers should be followed by a colon and a space, not an equals sign. So
maybe $request.="Host: $host\r\n\r\n" would have been a bit more successful.
But your code is still going to fall down flat if you receive a chunked
response, for example.

--
phil [dot] ronan @ virgin [dot] net
http://vzone.virgin.net/phil.ronan/

 

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

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