To cURL or not to cURL?

Last post 05-05-2008 4:49 PM by CrazyMerlin. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 05-05-2008 8:23 AM

    To cURL or not to cURL?

    I haven't fully investigated this issue yet but I thought I'd post here as it is late and you never know, I may get some input before the morning.

    So here is the scenario...I have a method that creates a "Media Object" for our users. When a media object is created, the user is given a list of files to link to the object. Upon selecting that file, I would like to populate as much data on the form as I can (never trust users!)

    One of the types of media will be FLV files. Now I have a function that reads the header of an FLV file and gets the meta data...so here is my problem:

    If I create a hosted object from the file, and then try to open it and seek the header data (using fseek) I get a "stream does not support seeking" error.

    So, what is the best way to get a set number of bytes from the file? I cannot have the whole file download, because most of the user files will be 100meg and upwards.

    cURL? HTTP Content-range? Another way?

    Thanks for any and all input.

    Paul 

    Life is a PHP script in need of debugging!
    Filed under: , ,
  • 05-05-2008 3:47 PM In reply to

    • BarryR
    • Top 10 Contributor
    • Joined on 07-20-2007
    • San Diego
    • Posts 612

    Re: To cURL or not to cURL?

    You would use "Range" to request a specific range.  Another person here just asked the same question.  You can find my response at:

    http://developer.nirvanix.com/forums/p/315/1015.aspx#1015

    This will let you retrieve a specific byte range.  You can simulate streaming by requesting chunks and buffering the video to be played.

    Regards,
        Barry R.

    IM Support (Feel free to add me)

    MSN: barryruffner@msn.com
    Gmail: barryruffner@gmail.com
  • 05-05-2008 4:49 PM In reply to

    Re: To cURL or not to cURL?

    Thanks Barry! 

    Life is a PHP script in need of debugging!
Page 1 of 1 (3 items)