Hi, i'm coding a script for checking premium links on UPTOBOX.
(I tray too for UPLOADING and DEPOSITFILES and I have the same problems).
The code :
For the moment, everything's right, I can see the premium link.
Now, if I do :
I'm redirected on an error page in UPTOBOX website
If I do :
It's downloading the debrid file, OK, but "readfile()" use my bandwith 
And if I do
I have a 400 Bad Request
If somebody know how to do, it will be very nice.
(I tray too for UPLOADING and DEPOSITFILES and I have the same problems).
The code :
PHP:
<?php
session_start();
$cookie='';
$c = curl_init() ;
curl_setopt($c, CURLOPT_URL, "http://uptobox.com/ruke1v5m2xr3");
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($c, CURLOPT_HEADER, 1);
curl_setopt($c,CURLOPT_USERAGENT,'Mozilla/5.0 (Windows; U; Windows NT 6.0; fr; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10');
curl_setopt($c, CURLOPT_REFERER,"http://www.uptobox.com");
curl_setopt($c, CURLOPT_COOKIE,$cookie);
$page_c = curl_exec($c);
// To see the premium link on the headers
$pos1=strpos($page_c,'Location: ')+10;
$page_c=substr($page_c,$pos1);
$pos2=strpos($page_c,'Transfer');
$liendeb=trim(substr($page_c,0,$pos2));
//echo $liendeb;
Now, if I do :
PHP:
header("Location: ".$liendeb);
If I do :
PHP:
header("Content-disposition: attachment; filename=Film de fou.avi");
header("Accept-Ranges: bytes");
header("Content-Type: application/force-download");
header("Content-Transfer-Encoding: binary\n");
header("Content-Length: 1489649524");
header("Pragma: no-cache");
header("Keep-Alive: timeout=15, max=100");
header("Expires: 0");
readfile($liendeb);
And if I do
PHP:
$c = curl_init() ;
curl_setopt($c, CURLOPT_URL, $liendeb);
curl_setopt($c, CURLOPT_HTTPHEADER, array("Accept-Ranges: bytes", "Content-Length: 1489649524", "Content-Disposition: attachment", "Content-Type: application/octet-stream", "Content-Transfer-Encoding: binary", "Keep-Alive: timeout=15, max=100", "Connection: Keep-Alive"));
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($c,CURLOPT_USERAGENT,'Mozilla/5.0 (Windows; U; Windows NT 6.0; fr; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10');
curl_setopt($c, CURLOPT_COOKIE,'$cookie);
$page_c = curl_exec($c);
echo $page_c;
If somebody know how to do, it will be very nice.