Copy Source | Copy HTML <?php $offset = isset ( $_REQUEST [ 'offset' ]) ? (int) $_REQUEST [ 'offset' ] : 0; $size = isset ( $_REQUEST [ 'size' ]) ? (int) $_REQUEST [ 'size' ] : false ; $name = isset ( $_REQUEST [ 'name' ]) ? urlencode( $_REQUEST [ 'name' ]) : 'download.bin' ; if ( empty ( $size )) die ; // link to archive file $url = 'http://archive_file_url' ; @set_time_limit(0); $range_size = $size ; $range_offset = $offset ; if ( isset ( $_SERVER [ 'HTTP_RANGE' ])) { if (preg_match( '/^bytes=(\d+)\-$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size -= $m [ 1 ]; } elseif (preg_match( '/^bytes=(\d+)\-(\d+)$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size = $m [ 2 ]- $m [ 1 ]+ 1 ; } else { // TODO (aig): support other ranges if needed die (); } header( 'HTTP/1.1 206 Partial Content' ); } else { header( 'HTTP/1.1 200 Ok' ); } $range = ( $range_offset ). "-" .( $range_offset + $range_size - 1 ); header( "Content-Type: application/octet-stream" ); header( "Accept-Ranges: bytes" ); header( "Content-Length: $range_size" ); header( 'Content-Disposition: attachment; filename="' . $name . '";' ); $ch = curl_init(); curl_setopt( $ch ,CURLOPT_URL, $url ); curl_setopt( $ch ,CURLOPT_RANGE, $range ); curl_setopt( $ch ,CURLOPT_RETURNTRANSFER,0); curl_setopt( $ch ,CURLOPT_FOLLOWLOCATION, 1 ); curl_setopt( $ch ,CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3' ); curl_exec( $ch ); curl_close( $ch ); ?>
Copy Source | Copy HTML <?php $offset = isset ( $_REQUEST [ 'offset' ]) ? (int) $_REQUEST [ 'offset' ] : 0; $size = isset ( $_REQUEST [ 'size' ]) ? (int) $_REQUEST [ 'size' ] : false ; $name = isset ( $_REQUEST [ 'name' ]) ? urlencode( $_REQUEST [ 'name' ]) : 'download.bin' ; if ( empty ( $size )) die ; // link to archive file $url = 'http://archive_file_url' ; @set_time_limit(0); $range_size = $size ; $range_offset = $offset ; if ( isset ( $_SERVER [ 'HTTP_RANGE' ])) { if (preg_match( '/^bytes=(\d+)\-$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size -= $m [ 1 ]; } elseif (preg_match( '/^bytes=(\d+)\-(\d+)$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size = $m [ 2 ]- $m [ 1 ]+ 1 ; } else { // TODO (aig): support other ranges if needed die (); } header( 'HTTP/1.1 206 Partial Content' ); } else { header( 'HTTP/1.1 200 Ok' ); } $range = ( $range_offset ). "-" .( $range_offset + $range_size - 1 ); header( "Content-Type: application/octet-stream" ); header( "Accept-Ranges: bytes" ); header( "Content-Length: $range_size" ); header( 'Content-Disposition: attachment; filename="' . $name . '";' ); $ch = curl_init(); curl_setopt( $ch ,CURLOPT_URL, $url ); curl_setopt( $ch ,CURLOPT_RANGE, $range ); curl_setopt( $ch ,CURLOPT_RETURNTRANSFER,0); curl_setopt( $ch ,CURLOPT_FOLLOWLOCATION, 1 ); curl_setopt( $ch ,CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3' ); curl_exec( $ch ); curl_close( $ch ); ?>
Copy Source | Copy HTML <?php $offset = isset ( $_REQUEST [ 'offset' ]) ? (int) $_REQUEST [ 'offset' ] : 0; $size = isset ( $_REQUEST [ 'size' ]) ? (int) $_REQUEST [ 'size' ] : false ; $name = isset ( $_REQUEST [ 'name' ]) ? urlencode( $_REQUEST [ 'name' ]) : 'download.bin' ; if ( empty ( $size )) die ; // link to archive file $url = 'http://archive_file_url' ; @set_time_limit(0); $range_size = $size ; $range_offset = $offset ; if ( isset ( $_SERVER [ 'HTTP_RANGE' ])) { if (preg_match( '/^bytes=(\d+)\-$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size -= $m [ 1 ]; } elseif (preg_match( '/^bytes=(\d+)\-(\d+)$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size = $m [ 2 ]- $m [ 1 ]+ 1 ; } else { // TODO (aig): support other ranges if needed die (); } header( 'HTTP/1.1 206 Partial Content' ); } else { header( 'HTTP/1.1 200 Ok' ); } $range = ( $range_offset ). "-" .( $range_offset + $range_size - 1 ); header( "Content-Type: application/octet-stream" ); header( "Accept-Ranges: bytes" ); header( "Content-Length: $range_size" ); header( 'Content-Disposition: attachment; filename="' . $name . '";' ); $ch = curl_init(); curl_setopt( $ch ,CURLOPT_URL, $url ); curl_setopt( $ch ,CURLOPT_RANGE, $range ); curl_setopt( $ch ,CURLOPT_RETURNTRANSFER,0); curl_setopt( $ch ,CURLOPT_FOLLOWLOCATION, 1 ); curl_setopt( $ch ,CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3' ); curl_exec( $ch ); curl_close( $ch ); ?>
Copy Source | Copy HTML <?php $offset = isset ( $_REQUEST [ 'offset' ]) ? (int) $_REQUEST [ 'offset' ] : 0; $size = isset ( $_REQUEST [ 'size' ]) ? (int) $_REQUEST [ 'size' ] : false ; $name = isset ( $_REQUEST [ 'name' ]) ? urlencode( $_REQUEST [ 'name' ]) : 'download.bin' ; if ( empty ( $size )) die ; // link to archive file $url = 'http://archive_file_url' ; @set_time_limit(0); $range_size = $size ; $range_offset = $offset ; if ( isset ( $_SERVER [ 'HTTP_RANGE' ])) { if (preg_match( '/^bytes=(\d+)\-$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size -= $m [ 1 ]; } elseif (preg_match( '/^bytes=(\d+)\-(\d+)$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size = $m [ 2 ]- $m [ 1 ]+ 1 ; } else { // TODO (aig): support other ranges if needed die (); } header( 'HTTP/1.1 206 Partial Content' ); } else { header( 'HTTP/1.1 200 Ok' ); } $range = ( $range_offset ). "-" .( $range_offset + $range_size - 1 ); header( "Content-Type: application/octet-stream" ); header( "Accept-Ranges: bytes" ); header( "Content-Length: $range_size" ); header( 'Content-Disposition: attachment; filename="' . $name . '";' ); $ch = curl_init(); curl_setopt( $ch ,CURLOPT_URL, $url ); curl_setopt( $ch ,CURLOPT_RANGE, $range ); curl_setopt( $ch ,CURLOPT_RETURNTRANSFER,0); curl_setopt( $ch ,CURLOPT_FOLLOWLOCATION, 1 ); curl_setopt( $ch ,CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3' ); curl_exec( $ch ); curl_close( $ch ); ?>
Copy Source | Copy HTML <?php $offset = isset ( $_REQUEST [ 'offset' ]) ? (int) $_REQUEST [ 'offset' ] : 0; $size = isset ( $_REQUEST [ 'size' ]) ? (int) $_REQUEST [ 'size' ] : false ; $name = isset ( $_REQUEST [ 'name' ]) ? urlencode( $_REQUEST [ 'name' ]) : 'download.bin' ; if ( empty ( $size )) die ; // link to archive file $url = 'http://archive_file_url' ; @set_time_limit(0); $range_size = $size ; $range_offset = $offset ; if ( isset ( $_SERVER [ 'HTTP_RANGE' ])) { if (preg_match( '/^bytes=(\d+)\-$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size -= $m [ 1 ]; } elseif (preg_match( '/^bytes=(\d+)\-(\d+)$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size = $m [ 2 ]- $m [ 1 ]+ 1 ; } else { // TODO (aig): support other ranges if needed die (); } header( 'HTTP/1.1 206 Partial Content' ); } else { header( 'HTTP/1.1 200 Ok' ); } $range = ( $range_offset ). "-" .( $range_offset + $range_size - 1 ); header( "Content-Type: application/octet-stream" ); header( "Accept-Ranges: bytes" ); header( "Content-Length: $range_size" ); header( 'Content-Disposition: attachment; filename="' . $name . '";' ); $ch = curl_init(); curl_setopt( $ch ,CURLOPT_URL, $url ); curl_setopt( $ch ,CURLOPT_RANGE, $range ); curl_setopt( $ch ,CURLOPT_RETURNTRANSFER,0); curl_setopt( $ch ,CURLOPT_FOLLOWLOCATION, 1 ); curl_setopt( $ch ,CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3' ); curl_exec( $ch ); curl_close( $ch ); ?>
Copy Source | Copy HTML <?php $offset = isset ( $_REQUEST [ 'offset' ]) ? (int) $_REQUEST [ 'offset' ] : 0; $size = isset ( $_REQUEST [ 'size' ]) ? (int) $_REQUEST [ 'size' ] : false ; $name = isset ( $_REQUEST [ 'name' ]) ? urlencode( $_REQUEST [ 'name' ]) : 'download.bin' ; if ( empty ( $size )) die ; // link to archive file $url = 'http://archive_file_url' ; @set_time_limit(0); $range_size = $size ; $range_offset = $offset ; if ( isset ( $_SERVER [ 'HTTP_RANGE' ])) { if (preg_match( '/^bytes=(\d+)\-$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size -= $m [ 1 ]; } elseif (preg_match( '/^bytes=(\d+)\-(\d+)$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size = $m [ 2 ]- $m [ 1 ]+ 1 ; } else { // TODO (aig): support other ranges if needed die (); } header( 'HTTP/1.1 206 Partial Content' ); } else { header( 'HTTP/1.1 200 Ok' ); } $range = ( $range_offset ). "-" .( $range_offset + $range_size - 1 ); header( "Content-Type: application/octet-stream" ); header( "Accept-Ranges: bytes" ); header( "Content-Length: $range_size" ); header( 'Content-Disposition: attachment; filename="' . $name . '";' ); $ch = curl_init(); curl_setopt( $ch ,CURLOPT_URL, $url ); curl_setopt( $ch ,CURLOPT_RANGE, $range ); curl_setopt( $ch ,CURLOPT_RETURNTRANSFER,0); curl_setopt( $ch ,CURLOPT_FOLLOWLOCATION, 1 ); curl_setopt( $ch ,CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3' ); curl_exec( $ch ); curl_close( $ch ); ?>
Copy Source | Copy HTML <?php $offset = isset ( $_REQUEST [ 'offset' ]) ? (int) $_REQUEST [ 'offset' ] : 0; $size = isset ( $_REQUEST [ 'size' ]) ? (int) $_REQUEST [ 'size' ] : false ; $name = isset ( $_REQUEST [ 'name' ]) ? urlencode( $_REQUEST [ 'name' ]) : 'download.bin' ; if ( empty ( $size )) die ; // link to archive file $url = 'http://archive_file_url' ; @set_time_limit(0); $range_size = $size ; $range_offset = $offset ; if ( isset ( $_SERVER [ 'HTTP_RANGE' ])) { if (preg_match( '/^bytes=(\d+)\-$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size -= $m [ 1 ]; } elseif (preg_match( '/^bytes=(\d+)\-(\d+)$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size = $m [ 2 ]- $m [ 1 ]+ 1 ; } else { // TODO (aig): support other ranges if needed die (); } header( 'HTTP/1.1 206 Partial Content' ); } else { header( 'HTTP/1.1 200 Ok' ); } $range = ( $range_offset ). "-" .( $range_offset + $range_size - 1 ); header( "Content-Type: application/octet-stream" ); header( "Accept-Ranges: bytes" ); header( "Content-Length: $range_size" ); header( 'Content-Disposition: attachment; filename="' . $name . '";' ); $ch = curl_init(); curl_setopt( $ch ,CURLOPT_URL, $url ); curl_setopt( $ch ,CURLOPT_RANGE, $range ); curl_setopt( $ch ,CURLOPT_RETURNTRANSFER,0); curl_setopt( $ch ,CURLOPT_FOLLOWLOCATION, 1 ); curl_setopt( $ch ,CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3' ); curl_exec( $ch ); curl_close( $ch ); ?>
Copy Source | Copy HTML <?php $offset = isset ( $_REQUEST [ 'offset' ]) ? (int) $_REQUEST [ 'offset' ] : 0; $size = isset ( $_REQUEST [ 'size' ]) ? (int) $_REQUEST [ 'size' ] : false ; $name = isset ( $_REQUEST [ 'name' ]) ? urlencode( $_REQUEST [ 'name' ]) : 'download.bin' ; if ( empty ( $size )) die ; // link to archive file $url = 'http://archive_file_url' ; @set_time_limit(0); $range_size = $size ; $range_offset = $offset ; if ( isset ( $_SERVER [ 'HTTP_RANGE' ])) { if (preg_match( '/^bytes=(\d+)\-$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size -= $m [ 1 ]; } elseif (preg_match( '/^bytes=(\d+)\-(\d+)$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size = $m [ 2 ]- $m [ 1 ]+ 1 ; } else { // TODO (aig): support other ranges if needed die (); } header( 'HTTP/1.1 206 Partial Content' ); } else { header( 'HTTP/1.1 200 Ok' ); } $range = ( $range_offset ). "-" .( $range_offset + $range_size - 1 ); header( "Content-Type: application/octet-stream" ); header( "Accept-Ranges: bytes" ); header( "Content-Length: $range_size" ); header( 'Content-Disposition: attachment; filename="' . $name . '";' ); $ch = curl_init(); curl_setopt( $ch ,CURLOPT_URL, $url ); curl_setopt( $ch ,CURLOPT_RANGE, $range ); curl_setopt( $ch ,CURLOPT_RETURNTRANSFER,0); curl_setopt( $ch ,CURLOPT_FOLLOWLOCATION, 1 ); curl_setopt( $ch ,CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3' ); curl_exec( $ch ); curl_close( $ch ); ?>
Copy Source | Copy HTML <?php $offset = isset ( $_REQUEST [ 'offset' ]) ? (int) $_REQUEST [ 'offset' ] : 0; $size = isset ( $_REQUEST [ 'size' ]) ? (int) $_REQUEST [ 'size' ] : false ; $name = isset ( $_REQUEST [ 'name' ]) ? urlencode( $_REQUEST [ 'name' ]) : 'download.bin' ; if ( empty ( $size )) die ; // link to archive file $url = 'http://archive_file_url' ; @set_time_limit(0); $range_size = $size ; $range_offset = $offset ; if ( isset ( $_SERVER [ 'HTTP_RANGE' ])) { if (preg_match( '/^bytes=(\d+)\-$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size -= $m [ 1 ]; } elseif (preg_match( '/^bytes=(\d+)\-(\d+)$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size = $m [ 2 ]- $m [ 1 ]+ 1 ; } else { // TODO (aig): support other ranges if needed die (); } header( 'HTTP/1.1 206 Partial Content' ); } else { header( 'HTTP/1.1 200 Ok' ); } $range = ( $range_offset ). "-" .( $range_offset + $range_size - 1 ); header( "Content-Type: application/octet-stream" ); header( "Accept-Ranges: bytes" ); header( "Content-Length: $range_size" ); header( 'Content-Disposition: attachment; filename="' . $name . '";' ); $ch = curl_init(); curl_setopt( $ch ,CURLOPT_URL, $url ); curl_setopt( $ch ,CURLOPT_RANGE, $range ); curl_setopt( $ch ,CURLOPT_RETURNTRANSFER,0); curl_setopt( $ch ,CURLOPT_FOLLOWLOCATION, 1 ); curl_setopt( $ch ,CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3' ); curl_exec( $ch ); curl_close( $ch ); ?>
Copy Source | Copy HTML <?php $offset = isset ( $_REQUEST [ 'offset' ]) ? (int) $_REQUEST [ 'offset' ] : 0; $size = isset ( $_REQUEST [ 'size' ]) ? (int) $_REQUEST [ 'size' ] : false ; $name = isset ( $_REQUEST [ 'name' ]) ? urlencode( $_REQUEST [ 'name' ]) : 'download.bin' ; if ( empty ( $size )) die ; // link to archive file $url = 'http://archive_file_url' ; @set_time_limit(0); $range_size = $size ; $range_offset = $offset ; if ( isset ( $_SERVER [ 'HTTP_RANGE' ])) { if (preg_match( '/^bytes=(\d+)\-$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size -= $m [ 1 ]; } elseif (preg_match( '/^bytes=(\d+)\-(\d+)$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size = $m [ 2 ]- $m [ 1 ]+ 1 ; } else { // TODO (aig): support other ranges if needed die (); } header( 'HTTP/1.1 206 Partial Content' ); } else { header( 'HTTP/1.1 200 Ok' ); } $range = ( $range_offset ). "-" .( $range_offset + $range_size - 1 ); header( "Content-Type: application/octet-stream" ); header( "Accept-Ranges: bytes" ); header( "Content-Length: $range_size" ); header( 'Content-Disposition: attachment; filename="' . $name . '";' ); $ch = curl_init(); curl_setopt( $ch ,CURLOPT_URL, $url ); curl_setopt( $ch ,CURLOPT_RANGE, $range ); curl_setopt( $ch ,CURLOPT_RETURNTRANSFER,0); curl_setopt( $ch ,CURLOPT_FOLLOWLOCATION, 1 ); curl_setopt( $ch ,CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3' ); curl_exec( $ch ); curl_close( $ch ); ?>
Copy Source | Copy HTML <?php $offset = isset ( $_REQUEST [ 'offset' ]) ? (int) $_REQUEST [ 'offset' ] : 0; $size = isset ( $_REQUEST [ 'size' ]) ? (int) $_REQUEST [ 'size' ] : false ; $name = isset ( $_REQUEST [ 'name' ]) ? urlencode( $_REQUEST [ 'name' ]) : 'download.bin' ; if ( empty ( $size )) die ; // link to archive file $url = 'http://archive_file_url' ; @set_time_limit(0); $range_size = $size ; $range_offset = $offset ; if ( isset ( $_SERVER [ 'HTTP_RANGE' ])) { if (preg_match( '/^bytes=(\d+)\-$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size -= $m [ 1 ]; } elseif (preg_match( '/^bytes=(\d+)\-(\d+)$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size = $m [ 2 ]- $m [ 1 ]+ 1 ; } else { // TODO (aig): support other ranges if needed die (); } header( 'HTTP/1.1 206 Partial Content' ); } else { header( 'HTTP/1.1 200 Ok' ); } $range = ( $range_offset ). "-" .( $range_offset + $range_size - 1 ); header( "Content-Type: application/octet-stream" ); header( "Accept-Ranges: bytes" ); header( "Content-Length: $range_size" ); header( 'Content-Disposition: attachment; filename="' . $name . '";' ); $ch = curl_init(); curl_setopt( $ch ,CURLOPT_URL, $url ); curl_setopt( $ch ,CURLOPT_RANGE, $range ); curl_setopt( $ch ,CURLOPT_RETURNTRANSFER,0); curl_setopt( $ch ,CURLOPT_FOLLOWLOCATION, 1 ); curl_setopt( $ch ,CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3' ); curl_exec( $ch ); curl_close( $ch ); ?>
Copy Source | Copy HTML <?php $offset = isset ( $_REQUEST [ 'offset' ]) ? (int) $_REQUEST [ 'offset' ] : 0; $size = isset ( $_REQUEST [ 'size' ]) ? (int) $_REQUEST [ 'size' ] : false ; $name = isset ( $_REQUEST [ 'name' ]) ? urlencode( $_REQUEST [ 'name' ]) : 'download.bin' ; if ( empty ( $size )) die ; // link to archive file $url = 'http://archive_file_url' ; @set_time_limit(0); $range_size = $size ; $range_offset = $offset ; if ( isset ( $_SERVER [ 'HTTP_RANGE' ])) { if (preg_match( '/^bytes=(\d+)\-$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size -= $m [ 1 ]; } elseif (preg_match( '/^bytes=(\d+)\-(\d+)$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size = $m [ 2 ]- $m [ 1 ]+ 1 ; } else { // TODO (aig): support other ranges if needed die (); } header( 'HTTP/1.1 206 Partial Content' ); } else { header( 'HTTP/1.1 200 Ok' ); } $range = ( $range_offset ). "-" .( $range_offset + $range_size - 1 ); header( "Content-Type: application/octet-stream" ); header( "Accept-Ranges: bytes" ); header( "Content-Length: $range_size" ); header( 'Content-Disposition: attachment; filename="' . $name . '";' ); $ch = curl_init(); curl_setopt( $ch ,CURLOPT_URL, $url ); curl_setopt( $ch ,CURLOPT_RANGE, $range ); curl_setopt( $ch ,CURLOPT_RETURNTRANSFER,0); curl_setopt( $ch ,CURLOPT_FOLLOWLOCATION, 1 ); curl_setopt( $ch ,CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3' ); curl_exec( $ch ); curl_close( $ch ); ?>
Copy Source | Copy HTML <?php $offset = isset ( $_REQUEST [ 'offset' ]) ? (int) $_REQUEST [ 'offset' ] : 0; $size = isset ( $_REQUEST [ 'size' ]) ? (int) $_REQUEST [ 'size' ] : false ; $name = isset ( $_REQUEST [ 'name' ]) ? urlencode( $_REQUEST [ 'name' ]) : 'download.bin' ; if ( empty ( $size )) die ; // link to archive file $url = 'http://archive_file_url' ; @set_time_limit(0); $range_size = $size ; $range_offset = $offset ; if ( isset ( $_SERVER [ 'HTTP_RANGE' ])) { if (preg_match( '/^bytes=(\d+)\-$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size -= $m [ 1 ]; } elseif (preg_match( '/^bytes=(\d+)\-(\d+)$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size = $m [ 2 ]- $m [ 1 ]+ 1 ; } else { // TODO (aig): support other ranges if needed die (); } header( 'HTTP/1.1 206 Partial Content' ); } else { header( 'HTTP/1.1 200 Ok' ); } $range = ( $range_offset ). "-" .( $range_offset + $range_size - 1 ); header( "Content-Type: application/octet-stream" ); header( "Accept-Ranges: bytes" ); header( "Content-Length: $range_size" ); header( 'Content-Disposition: attachment; filename="' . $name . '";' ); $ch = curl_init(); curl_setopt( $ch ,CURLOPT_URL, $url ); curl_setopt( $ch ,CURLOPT_RANGE, $range ); curl_setopt( $ch ,CURLOPT_RETURNTRANSFER,0); curl_setopt( $ch ,CURLOPT_FOLLOWLOCATION, 1 ); curl_setopt( $ch ,CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3' ); curl_exec( $ch ); curl_close( $ch ); ?>
Copy Source | Copy HTML <?php $offset = isset ( $_REQUEST [ 'offset' ]) ? (int) $_REQUEST [ 'offset' ] : 0; $size = isset ( $_REQUEST [ 'size' ]) ? (int) $_REQUEST [ 'size' ] : false ; $name = isset ( $_REQUEST [ 'name' ]) ? urlencode( $_REQUEST [ 'name' ]) : 'download.bin' ; if ( empty ( $size )) die ; // link to archive file $url = 'http://archive_file_url' ; @set_time_limit(0); $range_size = $size ; $range_offset = $offset ; if ( isset ( $_SERVER [ 'HTTP_RANGE' ])) { if (preg_match( '/^bytes=(\d+)\-$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size -= $m [ 1 ]; } elseif (preg_match( '/^bytes=(\d+)\-(\d+)$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size = $m [ 2 ]- $m [ 1 ]+ 1 ; } else { // TODO (aig): support other ranges if needed die (); } header( 'HTTP/1.1 206 Partial Content' ); } else { header( 'HTTP/1.1 200 Ok' ); } $range = ( $range_offset ). "-" .( $range_offset + $range_size - 1 ); header( "Content-Type: application/octet-stream" ); header( "Accept-Ranges: bytes" ); header( "Content-Length: $range_size" ); header( 'Content-Disposition: attachment; filename="' . $name . '";' ); $ch = curl_init(); curl_setopt( $ch ,CURLOPT_URL, $url ); curl_setopt( $ch ,CURLOPT_RANGE, $range ); curl_setopt( $ch ,CURLOPT_RETURNTRANSFER,0); curl_setopt( $ch ,CURLOPT_FOLLOWLOCATION, 1 ); curl_setopt( $ch ,CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3' ); curl_exec( $ch ); curl_close( $ch ); ?>
Copy Source | Copy HTML <?php $offset = isset ( $_REQUEST [ 'offset' ]) ? (int) $_REQUEST [ 'offset' ] : 0; $size = isset ( $_REQUEST [ 'size' ]) ? (int) $_REQUEST [ 'size' ] : false ; $name = isset ( $_REQUEST [ 'name' ]) ? urlencode( $_REQUEST [ 'name' ]) : 'download.bin' ; if ( empty ( $size )) die ; // link to archive file $url = 'http://archive_file_url' ; @set_time_limit(0); $range_size = $size ; $range_offset = $offset ; if ( isset ( $_SERVER [ 'HTTP_RANGE' ])) { if (preg_match( '/^bytes=(\d+)\-$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size -= $m [ 1 ]; } elseif (preg_match( '/^bytes=(\d+)\-(\d+)$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size = $m [ 2 ]- $m [ 1 ]+ 1 ; } else { // TODO (aig): support other ranges if needed die (); } header( 'HTTP/1.1 206 Partial Content' ); } else { header( 'HTTP/1.1 200 Ok' ); } $range = ( $range_offset ). "-" .( $range_offset + $range_size - 1 ); header( "Content-Type: application/octet-stream" ); header( "Accept-Ranges: bytes" ); header( "Content-Length: $range_size" ); header( 'Content-Disposition: attachment; filename="' . $name . '";' ); $ch = curl_init(); curl_setopt( $ch ,CURLOPT_URL, $url ); curl_setopt( $ch ,CURLOPT_RANGE, $range ); curl_setopt( $ch ,CURLOPT_RETURNTRANSFER,0); curl_setopt( $ch ,CURLOPT_FOLLOWLOCATION, 1 ); curl_setopt( $ch ,CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3' ); curl_exec( $ch ); curl_close( $ch ); ?>
Copy Source | Copy HTML <?php $offset = isset ( $_REQUEST [ 'offset' ]) ? (int) $_REQUEST [ 'offset' ] : 0; $size = isset ( $_REQUEST [ 'size' ]) ? (int) $_REQUEST [ 'size' ] : false ; $name = isset ( $_REQUEST [ 'name' ]) ? urlencode( $_REQUEST [ 'name' ]) : 'download.bin' ; if ( empty ( $size )) die ; // link to archive file $url = 'http://archive_file_url' ; @set_time_limit(0); $range_size = $size ; $range_offset = $offset ; if ( isset ( $_SERVER [ 'HTTP_RANGE' ])) { if (preg_match( '/^bytes=(\d+)\-$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size -= $m [ 1 ]; } elseif (preg_match( '/^bytes=(\d+)\-(\d+)$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size = $m [ 2 ]- $m [ 1 ]+ 1 ; } else { // TODO (aig): support other ranges if needed die (); } header( 'HTTP/1.1 206 Partial Content' ); } else { header( 'HTTP/1.1 200 Ok' ); } $range = ( $range_offset ). "-" .( $range_offset + $range_size - 1 ); header( "Content-Type: application/octet-stream" ); header( "Accept-Ranges: bytes" ); header( "Content-Length: $range_size" ); header( 'Content-Disposition: attachment; filename="' . $name . '";' ); $ch = curl_init(); curl_setopt( $ch ,CURLOPT_URL, $url ); curl_setopt( $ch ,CURLOPT_RANGE, $range ); curl_setopt( $ch ,CURLOPT_RETURNTRANSFER,0); curl_setopt( $ch ,CURLOPT_FOLLOWLOCATION, 1 ); curl_setopt( $ch ,CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3' ); curl_exec( $ch ); curl_close( $ch ); ?>
Copy Source | Copy HTML <?php $offset = isset ( $_REQUEST [ 'offset' ]) ? (int) $_REQUEST [ 'offset' ] : 0; $size = isset ( $_REQUEST [ 'size' ]) ? (int) $_REQUEST [ 'size' ] : false ; $name = isset ( $_REQUEST [ 'name' ]) ? urlencode( $_REQUEST [ 'name' ]) : 'download.bin' ; if ( empty ( $size )) die ; // link to archive file $url = 'http://archive_file_url' ; @set_time_limit(0); $range_size = $size ; $range_offset = $offset ; if ( isset ( $_SERVER [ 'HTTP_RANGE' ])) { if (preg_match( '/^bytes=(\d+)\-$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size -= $m [ 1 ]; } elseif (preg_match( '/^bytes=(\d+)\-(\d+)$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size = $m [ 2 ]- $m [ 1 ]+ 1 ; } else { // TODO (aig): support other ranges if needed die (); } header( 'HTTP/1.1 206 Partial Content' ); } else { header( 'HTTP/1.1 200 Ok' ); } $range = ( $range_offset ). "-" .( $range_offset + $range_size - 1 ); header( "Content-Type: application/octet-stream" ); header( "Accept-Ranges: bytes" ); header( "Content-Length: $range_size" ); header( 'Content-Disposition: attachment; filename="' . $name . '";' ); $ch = curl_init(); curl_setopt( $ch ,CURLOPT_URL, $url ); curl_setopt( $ch ,CURLOPT_RANGE, $range ); curl_setopt( $ch ,CURLOPT_RETURNTRANSFER,0); curl_setopt( $ch ,CURLOPT_FOLLOWLOCATION, 1 ); curl_setopt( $ch ,CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3' ); curl_exec( $ch ); curl_close( $ch ); ?>
Copy Source | Copy HTML <?php $offset = isset ( $_REQUEST [ 'offset' ]) ? (int) $_REQUEST [ 'offset' ] : 0; $size = isset ( $_REQUEST [ 'size' ]) ? (int) $_REQUEST [ 'size' ] : false ; $name = isset ( $_REQUEST [ 'name' ]) ? urlencode( $_REQUEST [ 'name' ]) : 'download.bin' ; if ( empty ( $size )) die ; // link to archive file $url = 'http://archive_file_url' ; @set_time_limit(0); $range_size = $size ; $range_offset = $offset ; if ( isset ( $_SERVER [ 'HTTP_RANGE' ])) { if (preg_match( '/^bytes=(\d+)\-$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size -= $m [ 1 ]; } elseif (preg_match( '/^bytes=(\d+)\-(\d+)$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size = $m [ 2 ]- $m [ 1 ]+ 1 ; } else { // TODO (aig): support other ranges if needed die (); } header( 'HTTP/1.1 206 Partial Content' ); } else { header( 'HTTP/1.1 200 Ok' ); } $range = ( $range_offset ). "-" .( $range_offset + $range_size - 1 ); header( "Content-Type: application/octet-stream" ); header( "Accept-Ranges: bytes" ); header( "Content-Length: $range_size" ); header( 'Content-Disposition: attachment; filename="' . $name . '";' ); $ch = curl_init(); curl_setopt( $ch ,CURLOPT_URL, $url ); curl_setopt( $ch ,CURLOPT_RANGE, $range ); curl_setopt( $ch ,CURLOPT_RETURNTRANSFER,0); curl_setopt( $ch ,CURLOPT_FOLLOWLOCATION, 1 ); curl_setopt( $ch ,CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3' ); curl_exec( $ch ); curl_close( $ch ); ?>
Copy Source | Copy HTML <?php $offset = isset ( $_REQUEST [ 'offset' ]) ? (int) $_REQUEST [ 'offset' ] : 0; $size = isset ( $_REQUEST [ 'size' ]) ? (int) $_REQUEST [ 'size' ] : false ; $name = isset ( $_REQUEST [ 'name' ]) ? urlencode( $_REQUEST [ 'name' ]) : 'download.bin' ; if ( empty ( $size )) die ; // link to archive file $url = 'http://archive_file_url' ; @set_time_limit(0); $range_size = $size ; $range_offset = $offset ; if ( isset ( $_SERVER [ 'HTTP_RANGE' ])) { if (preg_match( '/^bytes=(\d+)\-$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size -= $m [ 1 ]; } elseif (preg_match( '/^bytes=(\d+)\-(\d+)$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size = $m [ 2 ]- $m [ 1 ]+ 1 ; } else { // TODO (aig): support other ranges if needed die (); } header( 'HTTP/1.1 206 Partial Content' ); } else { header( 'HTTP/1.1 200 Ok' ); } $range = ( $range_offset ). "-" .( $range_offset + $range_size - 1 ); header( "Content-Type: application/octet-stream" ); header( "Accept-Ranges: bytes" ); header( "Content-Length: $range_size" ); header( 'Content-Disposition: attachment; filename="' . $name . '";' ); $ch = curl_init(); curl_setopt( $ch ,CURLOPT_URL, $url ); curl_setopt( $ch ,CURLOPT_RANGE, $range ); curl_setopt( $ch ,CURLOPT_RETURNTRANSFER,0); curl_setopt( $ch ,CURLOPT_FOLLOWLOCATION, 1 ); curl_setopt( $ch ,CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3' ); curl_exec( $ch ); curl_close( $ch ); ?>
Copy Source | Copy HTML <?php $offset = isset ( $_REQUEST [ 'offset' ]) ? (int) $_REQUEST [ 'offset' ] : 0; $size = isset ( $_REQUEST [ 'size' ]) ? (int) $_REQUEST [ 'size' ] : false ; $name = isset ( $_REQUEST [ 'name' ]) ? urlencode( $_REQUEST [ 'name' ]) : 'download.bin' ; if ( empty ( $size )) die ; // link to archive file $url = 'http://archive_file_url' ; @set_time_limit(0); $range_size = $size ; $range_offset = $offset ; if ( isset ( $_SERVER [ 'HTTP_RANGE' ])) { if (preg_match( '/^bytes=(\d+)\-$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size -= $m [ 1 ]; } elseif (preg_match( '/^bytes=(\d+)\-(\d+)$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size = $m [ 2 ]- $m [ 1 ]+ 1 ; } else { // TODO (aig): support other ranges if needed die (); } header( 'HTTP/1.1 206 Partial Content' ); } else { header( 'HTTP/1.1 200 Ok' ); } $range = ( $range_offset ). "-" .( $range_offset + $range_size - 1 ); header( "Content-Type: application/octet-stream" ); header( "Accept-Ranges: bytes" ); header( "Content-Length: $range_size" ); header( 'Content-Disposition: attachment; filename="' . $name . '";' ); $ch = curl_init(); curl_setopt( $ch ,CURLOPT_URL, $url ); curl_setopt( $ch ,CURLOPT_RANGE, $range ); curl_setopt( $ch ,CURLOPT_RETURNTRANSFER,0); curl_setopt( $ch ,CURLOPT_FOLLOWLOCATION, 1 ); curl_setopt( $ch ,CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3' ); curl_exec( $ch ); curl_close( $ch ); ?>
Copy Source | Copy HTML <?php $offset = isset ( $_REQUEST [ 'offset' ]) ? (int) $_REQUEST [ 'offset' ] : 0; $size = isset ( $_REQUEST [ 'size' ]) ? (int) $_REQUEST [ 'size' ] : false ; $name = isset ( $_REQUEST [ 'name' ]) ? urlencode( $_REQUEST [ 'name' ]) : 'download.bin' ; if ( empty ( $size )) die ; // link to archive file $url = 'http://archive_file_url' ; @set_time_limit(0); $range_size = $size ; $range_offset = $offset ; if ( isset ( $_SERVER [ 'HTTP_RANGE' ])) { if (preg_match( '/^bytes=(\d+)\-$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size -= $m [ 1 ]; } elseif (preg_match( '/^bytes=(\d+)\-(\d+)$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size = $m [ 2 ]- $m [ 1 ]+ 1 ; } else { // TODO (aig): support other ranges if needed die (); } header( 'HTTP/1.1 206 Partial Content' ); } else { header( 'HTTP/1.1 200 Ok' ); } $range = ( $range_offset ). "-" .( $range_offset + $range_size - 1 ); header( "Content-Type: application/octet-stream" ); header( "Accept-Ranges: bytes" ); header( "Content-Length: $range_size" ); header( 'Content-Disposition: attachment; filename="' . $name . '";' ); $ch = curl_init(); curl_setopt( $ch ,CURLOPT_URL, $url ); curl_setopt( $ch ,CURLOPT_RANGE, $range ); curl_setopt( $ch ,CURLOPT_RETURNTRANSFER,0); curl_setopt( $ch ,CURLOPT_FOLLOWLOCATION, 1 ); curl_setopt( $ch ,CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3' ); curl_exec( $ch ); curl_close( $ch ); ?>
Copy Source | Copy HTML <?php $offset = isset ( $_REQUEST [ 'offset' ]) ? (int) $_REQUEST [ 'offset' ] : 0; $size = isset ( $_REQUEST [ 'size' ]) ? (int) $_REQUEST [ 'size' ] : false ; $name = isset ( $_REQUEST [ 'name' ]) ? urlencode( $_REQUEST [ 'name' ]) : 'download.bin' ; if ( empty ( $size )) die ; // link to archive file $url = 'http://archive_file_url' ; @set_time_limit(0); $range_size = $size ; $range_offset = $offset ; if ( isset ( $_SERVER [ 'HTTP_RANGE' ])) { if (preg_match( '/^bytes=(\d+)\-$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size -= $m [ 1 ]; } elseif (preg_match( '/^bytes=(\d+)\-(\d+)$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size = $m [ 2 ]- $m [ 1 ]+ 1 ; } else { // TODO (aig): support other ranges if needed die (); } header( 'HTTP/1.1 206 Partial Content' ); } else { header( 'HTTP/1.1 200 Ok' ); } $range = ( $range_offset ). "-" .( $range_offset + $range_size - 1 ); header( "Content-Type: application/octet-stream" ); header( "Accept-Ranges: bytes" ); header( "Content-Length: $range_size" ); header( 'Content-Disposition: attachment; filename="' . $name . '";' ); $ch = curl_init(); curl_setopt( $ch ,CURLOPT_URL, $url ); curl_setopt( $ch ,CURLOPT_RANGE, $range ); curl_setopt( $ch ,CURLOPT_RETURNTRANSFER,0); curl_setopt( $ch ,CURLOPT_FOLLOWLOCATION, 1 ); curl_setopt( $ch ,CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3' ); curl_exec( $ch ); curl_close( $ch ); ?>
Copy Source | Copy HTML <?php $offset = isset ( $_REQUEST [ 'offset' ]) ? (int) $_REQUEST [ 'offset' ] : 0; $size = isset ( $_REQUEST [ 'size' ]) ? (int) $_REQUEST [ 'size' ] : false ; $name = isset ( $_REQUEST [ 'name' ]) ? urlencode( $_REQUEST [ 'name' ]) : 'download.bin' ; if ( empty ( $size )) die ; // link to archive file $url = 'http://archive_file_url' ; @set_time_limit(0); $range_size = $size ; $range_offset = $offset ; if ( isset ( $_SERVER [ 'HTTP_RANGE' ])) { if (preg_match( '/^bytes=(\d+)\-$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size -= $m [ 1 ]; } elseif (preg_match( '/^bytes=(\d+)\-(\d+)$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size = $m [ 2 ]- $m [ 1 ]+ 1 ; } else { // TODO (aig): support other ranges if needed die (); } header( 'HTTP/1.1 206 Partial Content' ); } else { header( 'HTTP/1.1 200 Ok' ); } $range = ( $range_offset ). "-" .( $range_offset + $range_size - 1 ); header( "Content-Type: application/octet-stream" ); header( "Accept-Ranges: bytes" ); header( "Content-Length: $range_size" ); header( 'Content-Disposition: attachment; filename="' . $name . '";' ); $ch = curl_init(); curl_setopt( $ch ,CURLOPT_URL, $url ); curl_setopt( $ch ,CURLOPT_RANGE, $range ); curl_setopt( $ch ,CURLOPT_RETURNTRANSFER,0); curl_setopt( $ch ,CURLOPT_FOLLOWLOCATION, 1 ); curl_setopt( $ch ,CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3' ); curl_exec( $ch ); curl_close( $ch ); ?>
Copy Source | Copy HTML <?php $offset = isset ( $_REQUEST [ 'offset' ]) ? (int) $_REQUEST [ 'offset' ] : 0; $size = isset ( $_REQUEST [ 'size' ]) ? (int) $_REQUEST [ 'size' ] : false ; $name = isset ( $_REQUEST [ 'name' ]) ? urlencode( $_REQUEST [ 'name' ]) : 'download.bin' ; if ( empty ( $size )) die ; // link to archive file $url = 'http://archive_file_url' ; @set_time_limit(0); $range_size = $size ; $range_offset = $offset ; if ( isset ( $_SERVER [ 'HTTP_RANGE' ])) { if (preg_match( '/^bytes=(\d+)\-$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size -= $m [ 1 ]; } elseif (preg_match( '/^bytes=(\d+)\-(\d+)$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size = $m [ 2 ]- $m [ 1 ]+ 1 ; } else { // TODO (aig): support other ranges if needed die (); } header( 'HTTP/1.1 206 Partial Content' ); } else { header( 'HTTP/1.1 200 Ok' ); } $range = ( $range_offset ). "-" .( $range_offset + $range_size - 1 ); header( "Content-Type: application/octet-stream" ); header( "Accept-Ranges: bytes" ); header( "Content-Length: $range_size" ); header( 'Content-Disposition: attachment; filename="' . $name . '";' ); $ch = curl_init(); curl_setopt( $ch ,CURLOPT_URL, $url ); curl_setopt( $ch ,CURLOPT_RANGE, $range ); curl_setopt( $ch ,CURLOPT_RETURNTRANSFER,0); curl_setopt( $ch ,CURLOPT_FOLLOWLOCATION, 1 ); curl_setopt( $ch ,CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3' ); curl_exec( $ch ); curl_close( $ch ); ?>
Copy Source | Copy HTML <?php $offset = isset ( $_REQUEST [ 'offset' ]) ? (int) $_REQUEST [ 'offset' ] : 0; $size = isset ( $_REQUEST [ 'size' ]) ? (int) $_REQUEST [ 'size' ] : false ; $name = isset ( $_REQUEST [ 'name' ]) ? urlencode( $_REQUEST [ 'name' ]) : 'download.bin' ; if ( empty ( $size )) die ; // link to archive file $url = 'http://archive_file_url' ; @set_time_limit(0); $range_size = $size ; $range_offset = $offset ; if ( isset ( $_SERVER [ 'HTTP_RANGE' ])) { if (preg_match( '/^bytes=(\d+)\-$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size -= $m [ 1 ]; } elseif (preg_match( '/^bytes=(\d+)\-(\d+)$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size = $m [ 2 ]- $m [ 1 ]+ 1 ; } else { // TODO (aig): support other ranges if needed die (); } header( 'HTTP/1.1 206 Partial Content' ); } else { header( 'HTTP/1.1 200 Ok' ); } $range = ( $range_offset ). "-" .( $range_offset + $range_size - 1 ); header( "Content-Type: application/octet-stream" ); header( "Accept-Ranges: bytes" ); header( "Content-Length: $range_size" ); header( 'Content-Disposition: attachment; filename="' . $name . '";' ); $ch = curl_init(); curl_setopt( $ch ,CURLOPT_URL, $url ); curl_setopt( $ch ,CURLOPT_RANGE, $range ); curl_setopt( $ch ,CURLOPT_RETURNTRANSFER,0); curl_setopt( $ch ,CURLOPT_FOLLOWLOCATION, 1 ); curl_setopt( $ch ,CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3' ); curl_exec( $ch ); curl_close( $ch ); ?>
Copy Source | Copy HTML <?php $offset = isset ( $_REQUEST [ 'offset' ]) ? (int) $_REQUEST [ 'offset' ] : 0; $size = isset ( $_REQUEST [ 'size' ]) ? (int) $_REQUEST [ 'size' ] : false ; $name = isset ( $_REQUEST [ 'name' ]) ? urlencode( $_REQUEST [ 'name' ]) : 'download.bin' ; if ( empty ( $size )) die ; // link to archive file $url = 'http://archive_file_url' ; @set_time_limit(0); $range_size = $size ; $range_offset = $offset ; if ( isset ( $_SERVER [ 'HTTP_RANGE' ])) { if (preg_match( '/^bytes=(\d+)\-$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size -= $m [ 1 ]; } elseif (preg_match( '/^bytes=(\d+)\-(\d+)$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size = $m [ 2 ]- $m [ 1 ]+ 1 ; } else { // TODO (aig): support other ranges if needed die (); } header( 'HTTP/1.1 206 Partial Content' ); } else { header( 'HTTP/1.1 200 Ok' ); } $range = ( $range_offset ). "-" .( $range_offset + $range_size - 1 ); header( "Content-Type: application/octet-stream" ); header( "Accept-Ranges: bytes" ); header( "Content-Length: $range_size" ); header( 'Content-Disposition: attachment; filename="' . $name . '";' ); $ch = curl_init(); curl_setopt( $ch ,CURLOPT_URL, $url ); curl_setopt( $ch ,CURLOPT_RANGE, $range ); curl_setopt( $ch ,CURLOPT_RETURNTRANSFER,0); curl_setopt( $ch ,CURLOPT_FOLLOWLOCATION, 1 ); curl_setopt( $ch ,CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3' ); curl_exec( $ch ); curl_close( $ch ); ?>
Copy Source | Copy HTML <?php $offset = isset ( $_REQUEST [ 'offset' ]) ? (int) $_REQUEST [ 'offset' ] : 0; $size = isset ( $_REQUEST [ 'size' ]) ? (int) $_REQUEST [ 'size' ] : false ; $name = isset ( $_REQUEST [ 'name' ]) ? urlencode( $_REQUEST [ 'name' ]) : 'download.bin' ; if ( empty ( $size )) die ; // link to archive file $url = 'http://archive_file_url' ; @set_time_limit(0); $range_size = $size ; $range_offset = $offset ; if ( isset ( $_SERVER [ 'HTTP_RANGE' ])) { if (preg_match( '/^bytes=(\d+)\-$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size -= $m [ 1 ]; } elseif (preg_match( '/^bytes=(\d+)\-(\d+)$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size = $m [ 2 ]- $m [ 1 ]+ 1 ; } else { // TODO (aig): support other ranges if needed die (); } header( 'HTTP/1.1 206 Partial Content' ); } else { header( 'HTTP/1.1 200 Ok' ); } $range = ( $range_offset ). "-" .( $range_offset + $range_size - 1 ); header( "Content-Type: application/octet-stream" ); header( "Accept-Ranges: bytes" ); header( "Content-Length: $range_size" ); header( 'Content-Disposition: attachment; filename="' . $name . '";' ); $ch = curl_init(); curl_setopt( $ch ,CURLOPT_URL, $url ); curl_setopt( $ch ,CURLOPT_RANGE, $range ); curl_setopt( $ch ,CURLOPT_RETURNTRANSFER,0); curl_setopt( $ch ,CURLOPT_FOLLOWLOCATION, 1 ); curl_setopt( $ch ,CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3' ); curl_exec( $ch ); curl_close( $ch ); ?>
Copy Source | Copy HTML <?php $offset = isset ( $_REQUEST [ 'offset' ]) ? (int) $_REQUEST [ 'offset' ] : 0; $size = isset ( $_REQUEST [ 'size' ]) ? (int) $_REQUEST [ 'size' ] : false ; $name = isset ( $_REQUEST [ 'name' ]) ? urlencode( $_REQUEST [ 'name' ]) : 'download.bin' ; if ( empty ( $size )) die ; // link to archive file $url = 'http://archive_file_url' ; @set_time_limit(0); $range_size = $size ; $range_offset = $offset ; if ( isset ( $_SERVER [ 'HTTP_RANGE' ])) { if (preg_match( '/^bytes=(\d+)\-$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size -= $m [ 1 ]; } elseif (preg_match( '/^bytes=(\d+)\-(\d+)$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size = $m [ 2 ]- $m [ 1 ]+ 1 ; } else { // TODO (aig): support other ranges if needed die (); } header( 'HTTP/1.1 206 Partial Content' ); } else { header( 'HTTP/1.1 200 Ok' ); } $range = ( $range_offset ). "-" .( $range_offset + $range_size - 1 ); header( "Content-Type: application/octet-stream" ); header( "Accept-Ranges: bytes" ); header( "Content-Length: $range_size" ); header( 'Content-Disposition: attachment; filename="' . $name . '";' ); $ch = curl_init(); curl_setopt( $ch ,CURLOPT_URL, $url ); curl_setopt( $ch ,CURLOPT_RANGE, $range ); curl_setopt( $ch ,CURLOPT_RETURNTRANSFER,0); curl_setopt( $ch ,CURLOPT_FOLLOWLOCATION, 1 ); curl_setopt( $ch ,CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3' ); curl_exec( $ch ); curl_close( $ch ); ?>
Copy Source | Copy HTML <?php $offset = isset ( $_REQUEST [ 'offset' ]) ? (int) $_REQUEST [ 'offset' ] : 0; $size = isset ( $_REQUEST [ 'size' ]) ? (int) $_REQUEST [ 'size' ] : false ; $name = isset ( $_REQUEST [ 'name' ]) ? urlencode( $_REQUEST [ 'name' ]) : 'download.bin' ; if ( empty ( $size )) die ; // link to archive file $url = 'http://archive_file_url' ; @set_time_limit(0); $range_size = $size ; $range_offset = $offset ; if ( isset ( $_SERVER [ 'HTTP_RANGE' ])) { if (preg_match( '/^bytes=(\d+)\-$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size -= $m [ 1 ]; } elseif (preg_match( '/^bytes=(\d+)\-(\d+)$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size = $m [ 2 ]- $m [ 1 ]+ 1 ; } else { // TODO (aig): support other ranges if needed die (); } header( 'HTTP/1.1 206 Partial Content' ); } else { header( 'HTTP/1.1 200 Ok' ); } $range = ( $range_offset ). "-" .( $range_offset + $range_size - 1 ); header( "Content-Type: application/octet-stream" ); header( "Accept-Ranges: bytes" ); header( "Content-Length: $range_size" ); header( 'Content-Disposition: attachment; filename="' . $name . '";' ); $ch = curl_init(); curl_setopt( $ch ,CURLOPT_URL, $url ); curl_setopt( $ch ,CURLOPT_RANGE, $range ); curl_setopt( $ch ,CURLOPT_RETURNTRANSFER,0); curl_setopt( $ch ,CURLOPT_FOLLOWLOCATION, 1 ); curl_setopt( $ch ,CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3' ); curl_exec( $ch ); curl_close( $ch ); ?>
Copy Source | Copy HTML <?php $offset = isset ( $_REQUEST [ 'offset' ]) ? (int) $_REQUEST [ 'offset' ] : 0; $size = isset ( $_REQUEST [ 'size' ]) ? (int) $_REQUEST [ 'size' ] : false ; $name = isset ( $_REQUEST [ 'name' ]) ? urlencode( $_REQUEST [ 'name' ]) : 'download.bin' ; if ( empty ( $size )) die ; // link to archive file $url = 'http://archive_file_url' ; @set_time_limit(0); $range_size = $size ; $range_offset = $offset ; if ( isset ( $_SERVER [ 'HTTP_RANGE' ])) { if (preg_match( '/^bytes=(\d+)\-$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size -= $m [ 1 ]; } elseif (preg_match( '/^bytes=(\d+)\-(\d+)$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size = $m [ 2 ]- $m [ 1 ]+ 1 ; } else { // TODO (aig): support other ranges if needed die (); } header( 'HTTP/1.1 206 Partial Content' ); } else { header( 'HTTP/1.1 200 Ok' ); } $range = ( $range_offset ). "-" .( $range_offset + $range_size - 1 ); header( "Content-Type: application/octet-stream" ); header( "Accept-Ranges: bytes" ); header( "Content-Length: $range_size" ); header( 'Content-Disposition: attachment; filename="' . $name . '";' ); $ch = curl_init(); curl_setopt( $ch ,CURLOPT_URL, $url ); curl_setopt( $ch ,CURLOPT_RANGE, $range ); curl_setopt( $ch ,CURLOPT_RETURNTRANSFER,0); curl_setopt( $ch ,CURLOPT_FOLLOWLOCATION, 1 ); curl_setopt( $ch ,CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3' ); curl_exec( $ch ); curl_close( $ch ); ?>
Copy Source | Copy HTML <?php $offset = isset ( $_REQUEST [ 'offset' ]) ? (int) $_REQUEST [ 'offset' ] : 0; $size = isset ( $_REQUEST [ 'size' ]) ? (int) $_REQUEST [ 'size' ] : false ; $name = isset ( $_REQUEST [ 'name' ]) ? urlencode( $_REQUEST [ 'name' ]) : 'download.bin' ; if ( empty ( $size )) die ; // link to archive file $url = 'http://archive_file_url' ; @set_time_limit(0); $range_size = $size ; $range_offset = $offset ; if ( isset ( $_SERVER [ 'HTTP_RANGE' ])) { if (preg_match( '/^bytes=(\d+)\-$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size -= $m [ 1 ]; } elseif (preg_match( '/^bytes=(\d+)\-(\d+)$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size = $m [ 2 ]- $m [ 1 ]+ 1 ; } else { // TODO (aig): support other ranges if needed die (); } header( 'HTTP/1.1 206 Partial Content' ); } else { header( 'HTTP/1.1 200 Ok' ); } $range = ( $range_offset ). "-" .( $range_offset + $range_size - 1 ); header( "Content-Type: application/octet-stream" ); header( "Accept-Ranges: bytes" ); header( "Content-Length: $range_size" ); header( 'Content-Disposition: attachment; filename="' . $name . '";' ); $ch = curl_init(); curl_setopt( $ch ,CURLOPT_URL, $url ); curl_setopt( $ch ,CURLOPT_RANGE, $range ); curl_setopt( $ch ,CURLOPT_RETURNTRANSFER,0); curl_setopt( $ch ,CURLOPT_FOLLOWLOCATION, 1 ); curl_setopt( $ch ,CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3' ); curl_exec( $ch ); curl_close( $ch ); ?>
Copy Source | Copy HTML <?php $offset = isset ( $_REQUEST [ 'offset' ]) ? (int) $_REQUEST [ 'offset' ] : 0; $size = isset ( $_REQUEST [ 'size' ]) ? (int) $_REQUEST [ 'size' ] : false ; $name = isset ( $_REQUEST [ 'name' ]) ? urlencode( $_REQUEST [ 'name' ]) : 'download.bin' ; if ( empty ( $size )) die ; // link to archive file $url = 'http://archive_file_url' ; @set_time_limit(0); $range_size = $size ; $range_offset = $offset ; if ( isset ( $_SERVER [ 'HTTP_RANGE' ])) { if (preg_match( '/^bytes=(\d+)\-$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size -= $m [ 1 ]; } elseif (preg_match( '/^bytes=(\d+)\-(\d+)$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size = $m [ 2 ]- $m [ 1 ]+ 1 ; } else { // TODO (aig): support other ranges if needed die (); } header( 'HTTP/1.1 206 Partial Content' ); } else { header( 'HTTP/1.1 200 Ok' ); } $range = ( $range_offset ). "-" .( $range_offset + $range_size - 1 ); header( "Content-Type: application/octet-stream" ); header( "Accept-Ranges: bytes" ); header( "Content-Length: $range_size" ); header( 'Content-Disposition: attachment; filename="' . $name . '";' ); $ch = curl_init(); curl_setopt( $ch ,CURLOPT_URL, $url ); curl_setopt( $ch ,CURLOPT_RANGE, $range ); curl_setopt( $ch ,CURLOPT_RETURNTRANSFER,0); curl_setopt( $ch ,CURLOPT_FOLLOWLOCATION, 1 ); curl_setopt( $ch ,CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3' ); curl_exec( $ch ); curl_close( $ch ); ?>
Copy Source | Copy HTML <?php $offset = isset ( $_REQUEST [ 'offset' ]) ? (int) $_REQUEST [ 'offset' ] : 0; $size = isset ( $_REQUEST [ 'size' ]) ? (int) $_REQUEST [ 'size' ] : false ; $name = isset ( $_REQUEST [ 'name' ]) ? urlencode( $_REQUEST [ 'name' ]) : 'download.bin' ; if ( empty ( $size )) die ; // link to archive file $url = 'http://archive_file_url' ; @set_time_limit(0); $range_size = $size ; $range_offset = $offset ; if ( isset ( $_SERVER [ 'HTTP_RANGE' ])) { if (preg_match( '/^bytes=(\d+)\-$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size -= $m [ 1 ]; } elseif (preg_match( '/^bytes=(\d+)\-(\d+)$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size = $m [ 2 ]- $m [ 1 ]+ 1 ; } else { // TODO (aig): support other ranges if needed die (); } header( 'HTTP/1.1 206 Partial Content' ); } else { header( 'HTTP/1.1 200 Ok' ); } $range = ( $range_offset ). "-" .( $range_offset + $range_size - 1 ); header( "Content-Type: application/octet-stream" ); header( "Accept-Ranges: bytes" ); header( "Content-Length: $range_size" ); header( 'Content-Disposition: attachment; filename="' . $name . '";' ); $ch = curl_init(); curl_setopt( $ch ,CURLOPT_URL, $url ); curl_setopt( $ch ,CURLOPT_RANGE, $range ); curl_setopt( $ch ,CURLOPT_RETURNTRANSFER,0); curl_setopt( $ch ,CURLOPT_FOLLOWLOCATION, 1 ); curl_setopt( $ch ,CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3' ); curl_exec( $ch ); curl_close( $ch ); ?>
Copy Source | Copy HTML <?php $offset = isset ( $_REQUEST [ 'offset' ]) ? (int) $_REQUEST [ 'offset' ] : 0; $size = isset ( $_REQUEST [ 'size' ]) ? (int) $_REQUEST [ 'size' ] : false ; $name = isset ( $_REQUEST [ 'name' ]) ? urlencode( $_REQUEST [ 'name' ]) : 'download.bin' ; if ( empty ( $size )) die ; // link to archive file $url = 'http://archive_file_url' ; @set_time_limit(0); $range_size = $size ; $range_offset = $offset ; if ( isset ( $_SERVER [ 'HTTP_RANGE' ])) { if (preg_match( '/^bytes=(\d+)\-$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size -= $m [ 1 ]; } elseif (preg_match( '/^bytes=(\d+)\-(\d+)$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size = $m [ 2 ]- $m [ 1 ]+ 1 ; } else { // TODO (aig): support other ranges if needed die (); } header( 'HTTP/1.1 206 Partial Content' ); } else { header( 'HTTP/1.1 200 Ok' ); } $range = ( $range_offset ). "-" .( $range_offset + $range_size - 1 ); header( "Content-Type: application/octet-stream" ); header( "Accept-Ranges: bytes" ); header( "Content-Length: $range_size" ); header( 'Content-Disposition: attachment; filename="' . $name . '";' ); $ch = curl_init(); curl_setopt( $ch ,CURLOPT_URL, $url ); curl_setopt( $ch ,CURLOPT_RANGE, $range ); curl_setopt( $ch ,CURLOPT_RETURNTRANSFER,0); curl_setopt( $ch ,CURLOPT_FOLLOWLOCATION, 1 ); curl_setopt( $ch ,CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3' ); curl_exec( $ch ); curl_close( $ch ); ?>
Copy Source | Copy HTML <?php $offset = isset ( $_REQUEST [ 'offset' ]) ? (int) $_REQUEST [ 'offset' ] : 0; $size = isset ( $_REQUEST [ 'size' ]) ? (int) $_REQUEST [ 'size' ] : false ; $name = isset ( $_REQUEST [ 'name' ]) ? urlencode( $_REQUEST [ 'name' ]) : 'download.bin' ; if ( empty ( $size )) die ; // link to archive file $url = 'http://archive_file_url' ; @set_time_limit(0); $range_size = $size ; $range_offset = $offset ; if ( isset ( $_SERVER [ 'HTTP_RANGE' ])) { if (preg_match( '/^bytes=(\d+)\-$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size -= $m [ 1 ]; } elseif (preg_match( '/^bytes=(\d+)\-(\d+)$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size = $m [ 2 ]- $m [ 1 ]+ 1 ; } else { // TODO (aig): support other ranges if needed die (); } header( 'HTTP/1.1 206 Partial Content' ); } else { header( 'HTTP/1.1 200 Ok' ); } $range = ( $range_offset ). "-" .( $range_offset + $range_size - 1 ); header( "Content-Type: application/octet-stream" ); header( "Accept-Ranges: bytes" ); header( "Content-Length: $range_size" ); header( 'Content-Disposition: attachment; filename="' . $name . '";' ); $ch = curl_init(); curl_setopt( $ch ,CURLOPT_URL, $url ); curl_setopt( $ch ,CURLOPT_RANGE, $range ); curl_setopt( $ch ,CURLOPT_RETURNTRANSFER,0); curl_setopt( $ch ,CURLOPT_FOLLOWLOCATION, 1 ); curl_setopt( $ch ,CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3' ); curl_exec( $ch ); curl_close( $ch ); ?>
Copy Source | Copy HTML <?php $offset = isset ( $_REQUEST [ 'offset' ]) ? (int) $_REQUEST [ 'offset' ] : 0; $size = isset ( $_REQUEST [ 'size' ]) ? (int) $_REQUEST [ 'size' ] : false ; $name = isset ( $_REQUEST [ 'name' ]) ? urlencode( $_REQUEST [ 'name' ]) : 'download.bin' ; if ( empty ( $size )) die ; // link to archive file $url = 'http://archive_file_url' ; @set_time_limit(0); $range_size = $size ; $range_offset = $offset ; if ( isset ( $_SERVER [ 'HTTP_RANGE' ])) { if (preg_match( '/^bytes=(\d+)\-$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size -= $m [ 1 ]; } elseif (preg_match( '/^bytes=(\d+)\-(\d+)$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size = $m [ 2 ]- $m [ 1 ]+ 1 ; } else { // TODO (aig): support other ranges if needed die (); } header( 'HTTP/1.1 206 Partial Content' ); } else { header( 'HTTP/1.1 200 Ok' ); } $range = ( $range_offset ). "-" .( $range_offset + $range_size - 1 ); header( "Content-Type: application/octet-stream" ); header( "Accept-Ranges: bytes" ); header( "Content-Length: $range_size" ); header( 'Content-Disposition: attachment; filename="' . $name . '";' ); $ch = curl_init(); curl_setopt( $ch ,CURLOPT_URL, $url ); curl_setopt( $ch ,CURLOPT_RANGE, $range ); curl_setopt( $ch ,CURLOPT_RETURNTRANSFER,0); curl_setopt( $ch ,CURLOPT_FOLLOWLOCATION, 1 ); curl_setopt( $ch ,CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3' ); curl_exec( $ch ); curl_close( $ch ); ?>
Copy Source | Copy HTML <?php $offset = isset ( $_REQUEST [ 'offset' ]) ? (int) $_REQUEST [ 'offset' ] : 0; $size = isset ( $_REQUEST [ 'size' ]) ? (int) $_REQUEST [ 'size' ] : false ; $name = isset ( $_REQUEST [ 'name' ]) ? urlencode( $_REQUEST [ 'name' ]) : 'download.bin' ; if ( empty ( $size )) die ; // link to archive file $url = 'http://archive_file_url' ; @set_time_limit(0); $range_size = $size ; $range_offset = $offset ; if ( isset ( $_SERVER [ 'HTTP_RANGE' ])) { if (preg_match( '/^bytes=(\d+)\-$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size -= $m [ 1 ]; } elseif (preg_match( '/^bytes=(\d+)\-(\d+)$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size = $m [ 2 ]- $m [ 1 ]+ 1 ; } else { // TODO (aig): support other ranges if needed die (); } header( 'HTTP/1.1 206 Partial Content' ); } else { header( 'HTTP/1.1 200 Ok' ); } $range = ( $range_offset ). "-" .( $range_offset + $range_size - 1 ); header( "Content-Type: application/octet-stream" ); header( "Accept-Ranges: bytes" ); header( "Content-Length: $range_size" ); header( 'Content-Disposition: attachment; filename="' . $name . '";' ); $ch = curl_init(); curl_setopt( $ch ,CURLOPT_URL, $url ); curl_setopt( $ch ,CURLOPT_RANGE, $range ); curl_setopt( $ch ,CURLOPT_RETURNTRANSFER,0); curl_setopt( $ch ,CURLOPT_FOLLOWLOCATION, 1 ); curl_setopt( $ch ,CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3' ); curl_exec( $ch ); curl_close( $ch ); ?>
Copy Source | Copy HTML <?php $offset = isset ( $_REQUEST [ 'offset' ]) ? (int) $_REQUEST [ 'offset' ] : 0; $size = isset ( $_REQUEST [ 'size' ]) ? (int) $_REQUEST [ 'size' ] : false ; $name = isset ( $_REQUEST [ 'name' ]) ? urlencode( $_REQUEST [ 'name' ]) : 'download.bin' ; if ( empty ( $size )) die ; // link to archive file $url = 'http://archive_file_url' ; @set_time_limit(0); $range_size = $size ; $range_offset = $offset ; if ( isset ( $_SERVER [ 'HTTP_RANGE' ])) { if (preg_match( '/^bytes=(\d+)\-$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size -= $m [ 1 ]; } elseif (preg_match( '/^bytes=(\d+)\-(\d+)$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size = $m [ 2 ]- $m [ 1 ]+ 1 ; } else { // TODO (aig): support other ranges if needed die (); } header( 'HTTP/1.1 206 Partial Content' ); } else { header( 'HTTP/1.1 200 Ok' ); } $range = ( $range_offset ). "-" .( $range_offset + $range_size - 1 ); header( "Content-Type: application/octet-stream" ); header( "Accept-Ranges: bytes" ); header( "Content-Length: $range_size" ); header( 'Content-Disposition: attachment; filename="' . $name . '";' ); $ch = curl_init(); curl_setopt( $ch ,CURLOPT_URL, $url ); curl_setopt( $ch ,CURLOPT_RANGE, $range ); curl_setopt( $ch ,CURLOPT_RETURNTRANSFER,0); curl_setopt( $ch ,CURLOPT_FOLLOWLOCATION, 1 ); curl_setopt( $ch ,CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3' ); curl_exec( $ch ); curl_close( $ch ); ?>
Copy Source | Copy HTML <?php $offset = isset ( $_REQUEST [ 'offset' ]) ? (int) $_REQUEST [ 'offset' ] : 0; $size = isset ( $_REQUEST [ 'size' ]) ? (int) $_REQUEST [ 'size' ] : false ; $name = isset ( $_REQUEST [ 'name' ]) ? urlencode( $_REQUEST [ 'name' ]) : 'download.bin' ; if ( empty ( $size )) die ; // link to archive file $url = 'http://archive_file_url' ; @set_time_limit(0); $range_size = $size ; $range_offset = $offset ; if ( isset ( $_SERVER [ 'HTTP_RANGE' ])) { if (preg_match( '/^bytes=(\d+)\-$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size -= $m [ 1 ]; } elseif (preg_match( '/^bytes=(\d+)\-(\d+)$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size = $m [ 2 ]- $m [ 1 ]+ 1 ; } else { // TODO (aig): support other ranges if needed die (); } header( 'HTTP/1.1 206 Partial Content' ); } else { header( 'HTTP/1.1 200 Ok' ); } $range = ( $range_offset ). "-" .( $range_offset + $range_size - 1 ); header( "Content-Type: application/octet-stream" ); header( "Accept-Ranges: bytes" ); header( "Content-Length: $range_size" ); header( 'Content-Disposition: attachment; filename="' . $name . '";' ); $ch = curl_init(); curl_setopt( $ch ,CURLOPT_URL, $url ); curl_setopt( $ch ,CURLOPT_RANGE, $range ); curl_setopt( $ch ,CURLOPT_RETURNTRANSFER,0); curl_setopt( $ch ,CURLOPT_FOLLOWLOCATION, 1 ); curl_setopt( $ch ,CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3' ); curl_exec( $ch ); curl_close( $ch ); ?>
Copy Source | Copy HTML <?php $offset = isset ( $_REQUEST [ 'offset' ]) ? (int) $_REQUEST [ 'offset' ] : 0; $size = isset ( $_REQUEST [ 'size' ]) ? (int) $_REQUEST [ 'size' ] : false ; $name = isset ( $_REQUEST [ 'name' ]) ? urlencode( $_REQUEST [ 'name' ]) : 'download.bin' ; if ( empty ( $size )) die ; // link to archive file $url = 'http://archive_file_url' ; @set_time_limit(0); $range_size = $size ; $range_offset = $offset ; if ( isset ( $_SERVER [ 'HTTP_RANGE' ])) { if (preg_match( '/^bytes=(\d+)\-$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size -= $m [ 1 ]; } elseif (preg_match( '/^bytes=(\d+)\-(\d+)$/' , $_SERVER [ 'HTTP_RANGE' ], $m )) { $range_offset += $m [ 1 ]; $range_size = $m [ 2 ]- $m [ 1 ]+ 1 ; } else { // TODO (aig): support other ranges if needed die (); } header( 'HTTP/1.1 206 Partial Content' ); } else { header( 'HTTP/1.1 200 Ok' ); } $range = ( $range_offset ). "-" .( $range_offset + $range_size - 1 ); header( "Content-Type: application/octet-stream" ); header( "Accept-Ranges: bytes" ); header( "Content-Length: $range_size" ); header( 'Content-Disposition: attachment; filename="' . $name . '";' ); $ch = curl_init(); curl_setopt( $ch ,CURLOPT_URL, $url ); curl_setopt( $ch ,CURLOPT_RANGE, $range ); curl_setopt( $ch ,CURLOPT_RETURNTRANSFER,0); curl_setopt( $ch ,CURLOPT_FOLLOWLOCATION, 1 ); curl_setopt( $ch ,CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3' ); curl_exec( $ch ); curl_close( $ch ); ?>
Source: https://habr.com/ru/post/67043/
All Articles