If A.com/a.rar can not be accessed in celestial, if write a a.php script, put on the overseas server, access the script path B.com/a.php?url=http://a.com/a.rar
You can implement the file download, how to write this a.php file
Reply to discussion (solution)
Are you sure you can turn over the wall around the bend?
Http://www.cnblogs.com/sum41van/articles/1422450.html
B.com/a.php?url=http://a.com/a.rar
If the file is too small to write like this
$url = isset ($_get[' url ')? $_get[' URL ']: '; if ($url) { $content = file_get_contents ($url); if ($content) { header (' cache-control:public '); Header (' Content-type:application/octet-stream '); Header (' content-disposition:attachment; Filename= '. basename ($url)); echo $content; }}
To ensure that
1. Celestial can visit B.Com
2.b.com can access a.com
You can use Curl
$url = ' Incoming destination URL '; $ch = Curl_init (); Initialize curl_setopt ($ch, Curlopt_url, $url),//curl_setopt ($ch, Curlopt_referer, ' one routing URL '); Forge the Antecedents page curl_setopt ($ch, Curlopt_header, 1); curl_setopt ($ch, Curlopt_writefunction, ' func '); curl_exec ($ch); Execute function func ($ch, $str) { static $s = ' @ '; if ($s) { $s = trim ($str); if ($s) header ($s); } else echo $str; return strlen ($STR);}
B.com/a.php?url=http://a.com/a.rar
If the file is too small to write like this
$url = isset ($_get[' url ')? $_get[' URL ']: '; if ($url) { $content = file_get_contents ($url); if ($content) { header (' cache-control:public '); Header (' Content-type:application/octet-stream '); Header (' content-disposition:attachment; Filename= '. basename ($url)); echo $content; }}
Thank you pro, if you can join the download traffic statistics just fine
Download count?
Download count?
No. is to record the size of the file downloaded by this file plus the value.
Integrate the functionality of the download into the method and execute it once to add 1 to the data table
Download count?
No. is to record the size of the file downloaded by this file plus the value.
Next?? The file size added??
echo strlen ($content);
Can I take the size after?? In???.
Download count?
No. is to record the size of the file downloaded by this file plus the value.
Next?? The file size added??
echo strlen ($content);
Can I take the size after?? In???.
Thank you, today I learned a day of HTML to integrate code into the work
Download count?
No. is to record the size of the file downloaded by this file plus the value.
Next?? The file size added??
echo strlen ($content);
Can I take the size after?? In???.
Thank you, today I learned a day of HTML to integrate code into the work
http://qqgae.byethost16.com/1/
If the problem is solved, please paste the knot.