how can i make this script work??

Discussion in 'Programming' started by demonator09, Nov 30, 2008.

  1. #1
    Basically i have made a script for my site which will give my users megaupload direct download links on my site itself(but still users have to wait for 45 secs). So this is how this script works

    1. Users click on a given download link (eg: http://mywebsite.com/download.php?id=xxxxxxx)
    2. Then my script contacts the actual megaupload download page and get the captcha code. (eg: http://megaupload.com/?id=xxxxxxx)
    3. It gives the user the captcha.
    4. Then it sends the correct captcha code back to megaupload.
    5. If correct megaupload gives my script the actual download link after 45 secs.
    6. And during that period my script displays a message "Please wait or 45 secs to download."
    7. Then after 45 secs my script gives the users the actual download link. (eg: http://www138.megaupload.com/files/56c8b5d3002f03e8ef9dd3bd6a4d255c/Some_file.rar)

    The whole script works fine but the users can't download the file through the actual download link because the ip address used in this script is the server's ip address and megaupload allows the download only for the server ip and not to the user ip.

    So how can I make this script use the user's ip address for the whole process??
    I am using curl get and post for this script. Is there anyone who can help me?
     
    demonator09, Nov 30, 2008 IP
  2. misbah

    misbah Active Member

    Messages:
    265
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    68
    #2
    you can't do it
    I mean you can't make this script use the user's ip address
    cause, script run on server not client server.
     
    misbah, Nov 30, 2008 IP
  3. Bohra

    Bohra Prominent Member

    Messages:
    12,573
    Likes Received:
    537
    Best Answers:
    0
    Trophy Points:
    310
    #3
    The point is if u want to use the users ip than why would they use you script and not just download diectly from megaupload ?
     
    Bohra, Nov 30, 2008 IP
  4. demonator09

    demonator09 Peon

    Messages:
    235
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #4
    cause i want to make my site more user friendly so that users don't have to leave my site for download.
     
    demonator09, Nov 30, 2008 IP
  5. Bohra

    Bohra Prominent Member

    Messages:
    12,573
    Likes Received:
    537
    Best Answers:
    0
    Trophy Points:
    310
    #5
    hmm i dont think its possible than u can get a premium account and offer direct links then.
     
    Bohra, Nov 30, 2008 IP
  6. demonator09

    demonator09 Peon

    Messages:
    235
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #6
    that will get my premium account banned if I generate the links and give them to the users.
    And I don't want to use premium link generators because they use too much server bandwidth.
     
    demonator09, Nov 30, 2008 IP
  7. Bohra

    Bohra Prominent Member

    Messages:
    12,573
    Likes Received:
    537
    Best Answers:
    0
    Trophy Points:
    310
    #7
    I Dont think its possible then.. try using iframe and do it than...
     
    Bohra, Nov 30, 2008 IP
  8. AlbBoy

    AlbBoy Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Hi guys its my first post
    im not good
    in these fields
    i came te learn smthg
    its possible to find something for free here
    for exmp host or domain for free
    thnx for help
     
    AlbBoy, Nov 30, 2008 IP
  9. AlbBoy

    AlbBoy Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    im forget if sommebody help me make a pv mesage thnx
     
    AlbBoy, Nov 30, 2008 IP