You are here: Re: [PHP] help-regarding-file_get_contents « PHP « IT news, forums, messages
Re: [PHP] help-regarding-file_get_contents

Posted by Guillermo Rauch on 02/07/05 22:57

Does the server support passive FTP connections?

Extracted from the PHP Manual:

--------
PHP 3, PHP 4, PHP 5. ftps:// since PHP 4.3.0

*

ftp://example.com/pub/file.txt
*

ftp://user:password@example.com/pub/file.txt
*

ftps://example.com/pub/file.txt
*

ftps://user:password@example.com/pub/file.txt

Allows read access to existing files and creation of new files via
FTP. If the server does not support passive mode ftp, the connection
will fail.
--------

See http://docs.php.net/en/wrappers.html.

-Guillermo

On Mon, 7 Feb 2005 12:46:25 -0800 (PST), vijayaraj nagarajan
<bioinfovijayaraj@yahoo.com> wrote:
> hi john
> i am a php user...
> one help from you..
> i could download the contents of an url from http://
> sites....but when i tried downloading the contents
> from an ftp site...
> i get this error...
>
> Warning: file_get_contents(): php_hostconnect: connect
> failed in /var/www/html/get.php on line 3
>
> Warning:
> file_get_contents(ftp://ftp.ncbi.nih.gov/genbank/gbrel.txt):
> failed to open stream: FTP server reports 229 Entering
> Extended Passive Mode (|||50334|) in
> /var/www/html/get.php on line 3
> This is the content of the retreived file...
>
> could you suggest me how to go about this...
> thanks for spending your valuable time...
>
> --- John Holmes <holmes072000@charter.net> wrote:
>
> > From: "vijayaraj nagarajan"
> > <bioinfovijayaraj@yahoo.com>
> >
> > > i would like to fetch the content of a url.
> > > and then would like to put in my page...
> > dynamically
> > > refreshing it once in a day...
> > >
> > > is it possible to do this in php.
> > > i have used perl get url option and then parse the
> > > file, with the date and time function...to do
> > this.
> >
> > $file =
> > file_get_contents('http://www.domain.com/page.php');
> >
> > Save $file locally and you have your copy. use cron
> > to run the command once
> > per day.
> >
>
> __________________________________
> Do you Yahoo!?
> Read only the mail you want - Yahoo! Mail SpamGuard.
> http://promotions.yahoo.com/new_mail
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

 

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

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