php - Trying to download a file using curl where file download is blocked by javascript? -


i trying use curl download torrent file url is

http://torcache.net/torrent/006ddc8c407accdaf810bcff41e77299a373296a.torrent

you notice upon getting page download of file blocked few seconds via javascript, wondering if there anyway bypass while using curl , php?

thanks

the file not blocked via javascript, that's informal message if request file. redirect done via javascript.

you can simulate request own, important part here add http referrer request header. example:

$ curl -i -h 'referer: http://torcache.net/torrent/006ddc8c407accdaf810bcff41e77299a373296a.torrent' http://torcache.net/torrent/006ddc8c407accdaf810bcff41e77299a373296a.torrent http/1.1 200 ok server: nginx/1.3.0 date: sun, 10 jun 2012 17:13:59 gmt content-type: application/x-bittorrent content-length: 10767 last-modified: sat, 09 jun 2012 22:17:03 gmt connection: keep-alive content-encoding: gzip accept-ranges: bytes 

referrer 1 thing check, mind typo in http specs, see wikipedia.


Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -