Activity Stream
48,167 MEMBERS
61962 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Page 1 of 2 12 LastLast
Results 1 to 10 of 19
  1.     
    #1
    Member

    Lightbulb how to curl and proxy download

    hey,

    i would like to know how this ( shimory DOT com ) works TECHNICALLY. i suppose first layer is cURL in order to grab the cookie and the downloading link (like http//srv43.fil3s0n1c.com/ef4888/dfeee/file.zip). but HOW is it possible to make the visitor download the file INSTANTLY (shimory does not even grabs the file through like wget() but deservs it immediatly to the visitor, kind of proxy, with a link like http://serv02.sh1m0ry.com/yourfiledearvisitor.zip).
    i would like to know how to setup that kind of proxy/instant download.

    i dont want to run same service (there so many like this nowadays) but i'm interested in this kind of bypass/workaround for a website i am already running.

    is it full PHP or is there some kind of linux (mod_proxy, squid, etc) behind this?

    thank you and sorry for my bad english.

    looking for some code examples and/or tutorials. i can buy a good tuto up to $50

    Musa,
    musa Reviewed by musa on . how to curl and proxy download hey, i would like to know how this ( shimory DOT com ) works TECHNICALLY. i suppose first layer is cURL in order to grab the cookie and the downloading link (like http//srv43.fil3s0n1c.com/ef4888/dfeee/file.zip). but HOW is it possible to make the visitor download the file INSTANTLY (shimory does not even grabs the file through like wget() but deservs it immediatly to the visitor, kind of proxy, with a link like http://serv02.sh1m0ry.com/yourfiledearvisitor.zip). i would like to know how to Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Member
    bump

  4.     
    #3
    Respected Developer
    you need to check PHP: Streams.

    here is how it works
    1. user give link
    2. make script to grab download link
    3. stream that content to user.

    on 2. you can save data into a file, like on that site its saving a link as (http://shimory.com/static/1234567), 1234567 is either in database or file saved on server, So when user visit that link it will call that ID, Which has file link saved, cookie information etc.

    there are a lot of examples on PHP site to work with streams and one open source script for link generation i think named "Vinaleech"? I am not sure but try to search here and look at its code.
    Bots Development | Web Development | Wordpress Customization | PSD Conversion

    Life has many twists and turns in it, you have to take what you are given and use it for the best.

  5.     
    #4
    Banned
    This need an advance user to create the script.

    You can refer my thread here:
    http://www.besthostingforums.com/11-...ook-login.html

  6.     
    #5
    Member
    thanks for the info mRaza, i'll take a look at these.

    Santanu18 > i already consider myself an advanced php coder (+10 years of programming), and referring to your topic i don't need a script that grabs links from fast-debrid or so. i can do this by myself to be honest...
    i want to make a script that connects to a remote website trough a cookie (i already coded this part), then gets the real download link (already coded this too). And then delivers the file to user INSTANTLY (i dont currently know how to make this, and that is what i will pay for).
    what i am doing currently is grab the file to my dedicated server's hard disk drive via wget() then offer the file to the user a few minutes later...
    i deliver the file via the x-sendfile mod and notice i already know about readfile and don't want to set up a readfile stream-octet as it consums too much ram/cpu (files i will deliver are between 100 and 300Mb).
    if u can help in this then i'd be interested, drop me a pm...

    sry for my bad english.

  7.     
    #6
    Member
    Website's:
    epicimagehost.com
    The problem is you are using wget to download the file.
    If you want to stream the file to your users, you have to:

    1) Open the stream to the direct link.
    2) Send the required headers ( such as the cookie ) | So now you're writing to the stream.
    3) Read the response-headers. | Still the same stream, now you just read from it.
    4) Send headers to client ( header() function )
    5) Echo rest of response to the screen. | You're reading data from the stream in chunks

    But note that PHP isn't the right/best language for this.

  8.     
    #7
    Member
    any small exemple of this plz?

    let's take filesonic as an exemple for the rest of this topic discussion.

    1) and 2) Open the stream to the direct link. --> ok, opening the direct link (http://srv1337.filesonic.com/4546546...sired_file.rar) with php cURL and sending the authorized cookie.txt via CURLOPT_COOKIEFILE
    3) why read the response header?
    4) ok, sending headers as content-disposition attachment and force-download or stream-octet
    5) this is what i don't know how to do. how to stream? how to chunks the data?

    thank you.
    i only know php. no perl/cgi/c etc

  9.     
    #8
    Member
    Website's:
    epicimagehost.com
    3) - So you know what content-length to send to your client
    4) Ok, + content-length
    5) I've went through KWWH and it seems nobody posted this part. So I assume it's a secret.. So I keep my mouth shut. But I'll give you a place to start: http://www.php.net/manual/en/function.curl-setopt.php

  10.     
    #9
    Member
    ok for the third point, grabbing the content-lenght is a good reason.

    sending you a pm then, i already know much about the curl lib and the manual but dont get you about the stream...

  11.     
    #10
    Banned

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Stream download link to user using CURL
    By santanu18 in forum Technical Help Desk Support
    Replies: 2
    Last Post: 8th Dec 2011, 04:44 AM
  2. Can i Add in Glype Proxy code to my Custom HTML Proxy template?
    By mrHunt in forum Web Development Area
    Replies: 0
    Last Post: 27th Oct 2011, 11:37 PM
  3. [Hiring] PHP Curl upload/download functions
    By coincoinwc in forum Completed Transactions
    Replies: 1
    Last Post: 29th Sep 2011, 01:18 PM
  4. How can I download from filesonic using curl ?
    By shounak2011 in forum Web Application/Script Support
    Replies: 0
    Last Post: 17th Sep 2011, 07:17 AM
  5. need help in filesonic/wupload download using curl
    By saninokia in forum Web Development Area
    Replies: 1
    Last Post: 30th Jul 2011, 04:11 PM

Tags for this Thread

BE SOCIAL