tags:

views:

52

answers:

1

This link

http://ajaxcontroltoolkit.codeplex.com/releases/view/11121#DownloadId=28808

shows a popup on which one has to agree before being able to download.

So how to automate this with PHP curl ? Any existing similar sample code ?

+4  A: 

If you take a look at what's happening when you click on the "I agree" button with a tool like Live HTTP Headers, you'll see that :

  • When you click on the "I agreee" button, it sends an HTTP POST request
    • to http://ajaxcontroltoolkit.codeplex.com/releases/acceptLicense
  • That HTTP request returns a 302 response,
    • with a Location HTTP header that points to http://download.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=AjaxControlToolkit&DownloadId=28807&FileTime=128487916929600000&Build=16331
    • which is the adress from which your browser is actually downloading the file.

(see there for the HTTP headers of that exchange)


It doesn't seem to be any other kind of control/security...
So, downloading from that URL with curl should work, I'd say.

Pascal MARTIN
Thank you very much, will try.