Re: Best way to recieve image from url?

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

 



On Sun, Oct 19, 2008 at 6:46 PM, Nitsan Bin-Nun <nitsan@xxxxxxxxxxxx> wrote:
>
> As you can see it fetches the images contents and write them to new image on
> my local directory.
> Is this is the best way to do this? (I don't have curl)

    Do you have GET or wget on your server, with exec() privileges to
use them?  Your method is good for cross-platform usage, but won't
follow redirects.

> Does file_get_contents() uses buffer to get the contents of the image? (in
> case the server response is slow)
> There is a better way?

    As Borge suggested, it won't speed things up for you if the remote
server is slow, but if I understand you correctly, you want to know if
there's a way to keep it running on your end.  Check into either using
it as a cron job, a forked process, or by setting max_execution_time
and ignore_user_abort(), et al.

-- 
</Daniel P. Brown>
More full-root dedicated server packages:
Intel 2.4GHz/60GB/512MB/2TB $49.99/mo.
Intel 3.06GHz/80GB/1GB/2TB $59.99/mo.
Intel 2.4GHz/320/GB/1GB/3TB $74.99/mo.
Dedicated servers, VPS, and hosting from $2.50/mo.

-- 
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