phproxy using more bandwidth

Discussion in 'PHP' started by livewirerules, Mar 16, 2007.

  1. #1
    Im running a proxy with about 800 uniques a day.
    Im hosting the proxy on a dedicated server with 1GB ram.
    The problem is last month my proxy used only 60GB bandwidth but on march until today ,18 days it has used 102GB..Is it any problem and why suddenly the bandwidth usage increased??
     
    livewirerules, Mar 16, 2007 IP
  2. Chris369

    Chris369 Peon

    Messages:
    360
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I'm not sure you have the sudden increase but I found PHProxy was a right resource hog.

    I went through 500mb in a day and since swapping to CGI Proxy I haven't gone past 60mb a month.
     
    Chris369, Mar 16, 2007 IP
  3. kobra

    kobra Member

    Messages:
    75
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #3
    I'm using PHProxy 0.5 and there is a option in the index.php file that limit the size of the page I've set it up to 10MB and don't have any problems with the bandwidth since. Videos and large files aren't loaded.
     
    kobra, Mar 16, 2007 IP
  4. livewirerules

    livewirerules Active Member

    Messages:
    276
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    58
    #4
    My max file size says -1 ??? How do i give a specific size like 10 mb?
     
    livewirerules, Mar 16, 2007 IP
  5. MrX

    MrX Well-Known Member

    Messages:
    1,563
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    140
    #5
    This is for 10MB:
    'max_file_size'            => 10485760,
    PHP:
    -1 means rape my bandwidth, please.
     
    MrX, Mar 16, 2007 IP
  6. immortality

    immortality Peon

    Messages:
    1,512
    Likes Received:
    50
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Limiting your file size will reduce your BW greatly. I never saw the need for it even though my proxy was using 15-20GB of BW per day.
     
    immortality, Mar 16, 2007 IP
  7. fscripting

    fscripting Banned

    Messages:
    288
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Has Your Traffic also increased ?
     
    fscripting, Mar 17, 2007 IP
  8. megamoose

    megamoose Well-Known Member

    Messages:
    71
    Likes Received:
    1
    Best Answers:
    1
    Trophy Points:
    105
    #8
    some visitor probably downloaded a massive movie or file and then you're bandwidth gets chraged for it :(

    Just reduce the file size limit and you'll be fine :)

    Mark
     
    megamoose, Mar 17, 2007 IP
  9. Chuman

    Chuman Well-Known Member

    Messages:
    979
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    110
    #9
    I am hosting three proxy sites in same account. My hosting is http://www.iwhic.com I have already limited the file size to 5MB in all the three sites and tested downloading the file size exceeding the limit. I got the following error which means that users cant download huge chunk of files.

    
    Resource Error: An error has occured while trying to browse through the proxy. 
    The file your are attempting to download is too large.
    Maxiumum permissible file size is 10.00 MB
    Requested file size is 24.56 MB
    
    Code (markup):
    But from April 1st to April 6th which is today It already has consumed 92GB. My monthly bandwidth is 100GB. Kindly help me what should I do in this case ? How can I stop this leakage ?

    Also in the Awstats nothing is shown everything is blank ? Could this be a hosting problem ?

    Please help me.

    Sincerely
    Chuman.
     
    Chuman, Apr 6, 2008 IP
  10. PowerExtreme

    PowerExtreme Banned

    Messages:
    2,118
    Likes Received:
    75
    Best Answers:
    0
    Trophy Points:
    0
    #10
    u can ban some high bandwith consuiming countries from entering your site
     
    PowerExtreme, Apr 6, 2008 IP
  11. Chuman

    Chuman Well-Known Member

    Messages:
    979
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    110
    #11
    Where do I put this code ? when I put this code in index.php I get errors.

    /*
    PHProxy bandwidth MOD 1.1 
    This MOD will stop any hotlinking via PHProxy, even if the clients referrer is not set!
    
    */
    
    // allow hotlinking from these sites, separate by comma (make sure you enter your site’s domains)
    $domains=”www.nepalproxy.com,nepalproxy.com”;
    
    // convert domains into an array
    $domains=explode(”,”,$domains);
    
    // if there is a request:
    if($_GET[’q']!=”")
    {
    // get referer
    $referer=explode(”/”,($_SERVER[’HTTP_REFERER’]));
    // if the referer is not allowed:
    if(!in_array($referer[2],$domains))
    {
    // redirect to homepage and finish script
    header(”Location: http://”.$domains[0].”/”);
    
    exit();
    }
    }
    
    
    /*
    END MOD
    */
    PHP:
    Kindly Help Me.
     
    Last edited by a moderator: Sep 28, 2025
    Chuman, Apr 6, 2008 IP