Results 1 to 2 of 2
  1. #1

    (PHP) Using content headers in URl's

    Basically i need a way to seek the end of a URL and get the last 300 - 500 bytes.

    So far i decided to try with cURL. I am not sure if this code is right, because it still wants to downoad the whole file.


    PHP Code:
    $size remote_file_size($url);
    $ch curl_init($url);
    curl_setopt($chCURLOPT_HEADER1);
    curl_setopt($chCURLOPT_HTTPHEADER"Range: bytes=-300");
    curl_exec($ch);
    curl_close($ch);
    ?> 
    <<Please see rules for signature setup>>

  2. #2
    Nevermind i fiqured it out... Heres the code if anyone finds it usefull


    PHP Code:
    $size remote_file_size($url);
    $from $size 500;
    $ch curl_init($url);
    curl_setopt($chCURLOPT_HEADER0);
    curl_setopt($chCURLOPT_RESUME_FROM"$from");
    curl_exec($ch); 
    <<Please see rules for signature setup>>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •