PHP curl ile bu bağlantıyı indirmek için kod

1 Cevap php

Bu bağlantı

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

tek indirmek mümkün önce kabul etmek sahip olduğu bir popup gösterir.

Peki nasıl PHP curl ile bu otomatikleştirmek için? Varolan herhangi bir benzer örnek kod?

1 Cevap

Eğer böyle bir araç ile "katılıyorum" butonuna tıkladığınızda neler oluyor, bir göz atın eğer Live HTTP Headers, bunu göreceksiniz:

  • When you click on the "I agreee" button, it sends an HTTP POST request
    • için http://ajaxcontroltoolkit.codeplex.com/releases/acceptLicense
  • That HTTP request returns a 302 response,
    • http://download.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=AjaxControlToolkit&DownloadId=28807&FileTime=128487916929600000&Build=16331 işaret eden bir Location HTTP başlığı ile
    • hangi tarayıcı aslında dosyasını indiriyor hangi adres olduğunu.

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