Reply to Re: Problem with fsockopen()

Your name:

Reply:


Posted by Nico Busch on 10/11/05 20:42

fipaj1992@gmail.com wrote:
> Hi!
>
> I have very big problem with fsockopen() function. It is very
> important...
>
> That's code:
>
> <?php
> $test = fsockopen ('chrome.pl', '8080');
> ?>
>
> And that's result:
>
> Warning: fsockopen() [function.fsockopen]: php_network_getaddresses:
> getaddrinfo failed: Temporary failure in name resolution in
> /home/fipaj/serwer/works/jabber-php/class_jabber_php-0.4.2/test1.php on
> line 2
>
> Warning: fsockopen() [function.fsockopen]: unable to connect to
> chrome.pl:8080 (Unknown error) in
> /home/fipaj/serwer/works/jabber-php/class_jabber_php-0.4.2/test1.php on
> line 2
>
> I'm working on Linux Ubuntu 5.04 with Apache 2 (from package) and PHP5
> (from package too).
>
> I never use fsockopen(), so I'm absolutely "white"...
>
> Please help me, the sooner the better, because script is very, very
> important...
>
> Best Regards,
> Fipaj
>


Hi,
AFAIK the first parameter of the fsockopen function means the
target/host you want to connect to. Nonetheless in this case chrome.pl
is not a host. Due to this, the PHP interpreter ist not able to
establish a connection and you get the error. If chrome.pl is a host,
write it like http://www.chrome.pl.

best regards

Nico

[Back to original 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

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