Re: [PHP] how to download files require login

[email protected] (Richard Quadling)
Newsgroups php.general
Message-ID <[email protected]>
On 1 March 2010 17:00, Ashley Sheridan <[email protected]> wrote:
> On Mon, 2010-03-01 at 11:37 -0500, Ryan Sun wrote:
>
>> For URLs like 'http://download.fotolia.com/DownloadContent/1/h7G0bWGsGof8VvSqw32xFZ0KvD5eqbvN',
>> it requires user login to download.
>> Then how do I download it remotely via php server if I have the
>> username and password in hand?
>>
>
>
> This is a job for Curl. You create a Curl request that sends the login
> information to the remote site in the form that it expects (usually via
> some sort of post data from a form) and then you can receive the reply
> back. You can then form your requests that you need to make for the
> rest.
>
> There are some great add-ons for Firefox for this sort of thing, to look
> at what data is being sent to and from your browser.
>
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
>
>
>

If the authentication style is basic you COULD use the
http://username:[email protected]/page.xxxxxx



-- 
-----
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.