You are here: Re: FTP unable to connect with fsockopen « PHP Programming Language « IT news, forums, messages
Re: FTP unable to connect with fsockopen

Posted by Darko on 11/02/07 19:00

On Nov 2, 4:28 pm, MikeofPet <mike.g...@comcast.net> wrote:
> I am trying to implement FTP in a PHP script but am unable to make the
> connection to the remote server. The connection step times out at the
> fsockopen function. I am not sure if it is relevant but PHP is
> configured with "allow_url_fopen" ON. I am able to do an FTP connect
> using an FTP client and using the same host/username/password
> parameters.
>
> Any ideas would be appreciated.
>
> Thanks

Haven't worked with fsockopen, but I know I hadn't had any problems
with socket_create, socket_connect, gethostbyname, socket_write,
socket_recv, socket_read socket functions family. Maybe you should try
that, it's not so hard. Of course, check if you're opening the correct
port, since it's not a mandatory argument in fsockopen, maybe you
forgot to give the ftp port (it can vary from ftp server to ftp
server, but is often 21, it's standard). Writing php code that relies
on allow_url_fopen maybe isn't that good, since you don't know how
many servers support it.

 

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

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