How can I hide the download Rapidshare link

Discussion in 'PHP' started by ahmed_badawy, Mar 20, 2009.

  1. #1
    hi all

    I want a way to hide the download Rapidshare link

    Example

    http://rapidshare.com/files/ex.171877365/Example.rar

    this link have characteristic traffic share

    i want hide this link to

    www.mysite.com/down.php?name=Example.rar

    And is downloaded directly from Rapidshare

    Thank you.
     
    ahmed_badawy, Mar 20, 2009 IP
  2. Joak1m

    Joak1m Peon

    Messages:
    135
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    
    header("Content-Type: application/octet-stream"); 
    header("Content-Disposition: attachment; filename=\"Example.rar\"");
    
    PHP:
     
    Joak1m, Mar 21, 2009 IP
  3. ahmed_badawy

    ahmed_badawy Peon

    Messages:
    10
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    
    Warning: Cannot modify header information - headers already sent by (output started at /mounted-storage/home/***/***/www/down.php:1) in /mounted-storage/home/***/***/www/down.php on line 3
    
    Warning: Cannot modify header information - headers already sent by (output started at /mounted-storage/home/***/***/www/down.php:1) in /mounted-storage/home/***/***/www/down.php on line 4
    PHP:
    this code accept external links ?
     
    ahmed_badawy, Mar 21, 2009 IP
  4. Joak1m

    Joak1m Peon

    Messages:
    135
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Yes it does, you must put it in the beginning of the file.
    And mime content type should be:
    application/x-rar-compressed
    PHP:
     
    Joak1m, Mar 21, 2009 IP
  5. Joak1m

    Joak1m Peon

    Messages:
    135
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Probably you have different type of files. Something like this should get their mime types automatically:

    
    <?php
    $filetype = mime_content_type("$filename");
    header("Content-Type: $filetype"); 
    header("Content-Disposition: attachment; filename=\"$filename\"");
    ?>
    <html>
    <head... blabla ;)
    
    PHP:
     
    Joak1m, Mar 21, 2009 IP
  6. ahmed_badawy

    ahmed_badawy Peon

    Messages:
    10
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Unfortunately doesn't work :(

    The same previous error message :confused:
     
    ahmed_badawy, Mar 21, 2009 IP
  7. Joak1m

    Joak1m Peon

    Messages:
    135
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Header() must be called before any actual output is sent - HTML tags, blank lines, empty spaces etc. Thats what the error is about. Are you using some kind of CMS?
     
    Joak1m, Mar 21, 2009 IP
  8. ahmed_badawy

    ahmed_badawy Peon

    Messages:
    10
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    i used this code in new php file and i add link rapidshare traffic share or hot link , Both not working and Show the same error
     
    ahmed_badawy, Mar 21, 2009 IP
  9. Barti1987

    Barti1987 Well-Known Member

    Messages:
    2,703
    Likes Received:
    115
    Best Answers:
    0
    Trophy Points:
    185
    #9
    You can't do it the way you want.

    First you have to actually open the URL and read the download link and forward the user to it.

    You can use CURL and Cookies if you have a paid account, this should work better.

    Peace,
     
    Barti1987, Mar 21, 2009 IP
  10. NatalicWolf

    NatalicWolf Peon

    Messages:
    262
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #10
    You would run out of bandwidth on your RS account before you knew it on a high load server. You cant just point to it for a free user and expect it to work, it just wont...
     
    NatalicWolf, Mar 21, 2009 IP
  11. ahmed_badawy

    ahmed_badawy Peon

    Messages:
    10
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Are there any solutions for how to hide the Rapidshare links to them can not download again

    I want to download from rapidshare traffic share a certain number for users in my site

    Are there any solutions, even if in return for $ $ $

    thanx
     
    ahmed_badawy, Mar 21, 2009 IP