אפשר לעשות דבר כזה:
להעביר בלוקיישן אל העמוד שמבצע לקיחת תוכן מהקישור שרציתה וקח דוגמא זריזה:
קובץ ראשי: index.php?file=123.rar
PHP קוד:
<?php
$file=$_GET["file"];
$file="get.php?file={$file}";
header("Content-Disposition: attachment; filename=" . urlencode($file));
header("Content-Type: application/force-download");
header("Content-Type: application/octet-stream");
header("Content-Type: application/download");
header("Content-Description: File Transfer");
header("Content-Length: " . filesize($file));
flush(); // this doesn't really matter.
$fp = fopen($file, "r");
while (!feof($fp))
{
echo fread($fp, 65536);
flush(); // this is essential for large downloads
}
fclose($fp);
?>
get.php
PHP קוד:
<?php
$file=$_GET["file"];
$code="123456";
file_get_contents("http://xx.co.il?get={$file}&code={$code}");
?>
אם בא לך לתגמל אותי ככה בקטנה אני ישלח לך paypal בפרטי חח
