Hi I want to be able to do the following:\[code\]<?phpfunction get_data($url){ $ch = curl_init(); $timeout = 5; curl_setopt($ch,CURLOPT_URL,$url); curl_setopt($ch,CURLOPT_RETURNTRANSFER,1); curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout); curl_setopt($ch,CURLOPT_SSL_VERIFYPEER, false); $data = http://stackoverflow.com/questions/10540699/curl_exec($ch); curl_close($ch); return $data;}$data = get_data('https://torcache.net/torrent/7975CDEEDCEC6092729DAEAE302CB9BD7D633B0B.torrent');?>\[/code\]However it seems that torcache is returning a html page and then the torrent is seved a few seconds after, is there anyway for curl to get the actual torrent? At the minute $data just contains the html page torcache returns?Attempted to set referer as: curl_setopt($ch, CURLOPT_REFERER, 'https://torcache.net/torrent/7975CDEEDCEC6092729DAEAE302CB9BD7D633B0B.torrent');But not working, I get this response:\[code\]<head><title>302 Found</title></head><body bgcolor="white"><center><h1>302 Found</h1></center><hr><center>nginx/1.2.0</center></body></html>\[/code\]ThanksSOLVED:\[code\]function get_data($url){ $ch = curl_init(); $timeout = 5; curl_setopt($ch,CURLOPT_URL,$url); curl_setopt($ch,CURLOPT_RETURNTRANSFER,1); curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout); curl_setopt($ch,CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch,CURLOPT_REFERER, 'https://torcache.net/'); curl_setopt($ch,CURLOPT_ENCODING,"gzip"); $data = http://stackoverflow.com/questions/10540699/curl_exec($ch); curl_close($ch); return $data;}\[/code\]Added "curl_setopt($ch,CURLOPT_ENCODING,"gzip");" this also as the data was gzipped!