Re: Can a PHP script process a file on a remote computer?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi again, Andrew:

    You had asked some questions that I forgot to address with my previous
reply, so here goes:

    The test file that I'm using -- which probably is a small version of the
normal file -- is around 60 MB in size (just under 30,000 records).

    I checked the phpinfo info and it appears that the allow_url_fopen
setting is set to "On," which I take is a good thing.  How, then, do I
specify the filename at the server so that it points back to the file that
is on my computer (or whatever computer is trying to initiate the process)?

    Thanks again for your help,

        Jon


----- Original Message -----
From: "Jon Westcot" <jon@xxxxxxxxxxx>
To: "PHP General" <php-general@xxxxxxxxxxxxx>
Sent: Wednesday, October 24, 2007 1:22 PM
Subject: Re:  Can a PHP script process a file on a remote computer?


> Hi Andrew:
>
>     Thanks for the reply.
>
>     If I use fopen() to open the remote file, how do I specify its
location?
> Isn't it going to need to know not only the address of the computer I'm
> using but the path on that computer to the file?  Does it get all that
from
> the name I pass over to it?
>
>     Also, can I adjust the allow_url_fopen setting from within a PHP
script,
> or do I need to manually set it in the PHP.INI file?  The server I'm
> using -- not my own; this is for a friend -- is a shared server with
GoDaddy
> and they make it so incredibly hard to find anything.
>
>     Thanks!
>
>         Jon
>
>
> ----- Original Message -----
> From: "Andrew Ballard" <aballard@xxxxxxxxx>
> To: "PHP General" <php-general@xxxxxxxxxxxxx>
> Sent: Wednesday, October 24, 2007 1:15 PM
> Subject: Re:  Can a PHP script process a file on a remote computer?
>
>
> > How big is the file? fgetcsv() will read any file that you can get a
> > handle to using fopen() or fsockopen(),  including remote files.
> > However, if allow_url_fopen is not enabled, you can't use fopen().
> > Also if the file is so large that your script is timing out while
> > waiting for it to be uploaded, it could also timeout just trying to
> > read the file remotely as well.
> >
> > Andrew
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux