28, May 2012

allow only one file for each IP - webmaster forum

 
Webdigity webmaster forums
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  Web Development  >  PhP
Topic: allow only one file for each IP
« previous next »
Pages: 1 [2] Print
Instabuck - The easy way to sell digital products online

Author Topic: allow only one file for each IP  (Read 4832 times)
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #20 on: Jul 07, 2007, 03:27:52 pm »

You should do that yourself, by checking how many times the user entered the if(isset($_SERVER['HTTP_RANGE'])) {?> and I am not sure if this is going to work.

will say if I test this access maybe I don't need the database?

I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 5799
46391 credits
Members referred : 3



« Reply #21 on: Jul 07, 2007, 03:42:55 pm »

Yes. The database thing is to have 1 concurrent download per ip.

Trial and Error my two best teachers Cool
Join us @ facebook or twitter

Last blog : Butterfly Marketing 2.0
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #22 on: Jul 07, 2007, 04:14:37 pm »

Yes. The database thing is to have 1 concurrent download per ip.

I need a limit for each IP

I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 5799
46391 credits
Members referred : 3



« Reply #23 on: Jul 07, 2007, 04:26:20 pm »

The script as is has limit for 1 download per ip. To make this work with dl managers, you should keep in the db how many open slots the user have, and how many of them stoped....

In general this is not something you really need Smiley

Trial and Error my two best teachers Cool
Join us @ facebook or twitter

Last blog : Butterfly Marketing 2.0
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #24 on: Jul 07, 2007, 04:28:59 pm »

I have the problem that one 900MB download eats >5GB on traffic based on the settings for the DL manager

I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 5799
46391 credits
Members referred : 3



« Reply #25 on: Jul 07, 2007, 04:51:17 pm »

How that happens?

Trial and Error my two best teachers Cool
Join us @ facebook or twitter

Last blog : Butterfly Marketing 2.0
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #26 on: Jul 07, 2007, 04:56:01 pm »

How that happens?

because the DL manager starts several (partial) downloads for one file (to make it faster???)

I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 5799
46391 credits
Members referred : 3



« Reply #27 on: Jul 07, 2007, 06:32:03 pm »

The partial downloads will use the same bandwidth, but they will use more bandwidth from your port.

Trial and Error my two best teachers Cool
Join us @ facebook or twitter

Last blog : Butterfly Marketing 2.0
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #28 on: Jul 07, 2007, 07:37:34 pm »

The partial downloads will use the same bandwidth, but they will use more bandwidth from your port.

wil say I pay for that bandwidth!!!

Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #29 on: Jul 15, 2007, 08:30:54 pm »

Hi, just did a test:\
I downloaded one file with 3 possible connections for each server

Code:
82.161.6.3- - [15/Jul/2007:20:36:41 -0400] "GET /files/all/cs_test_file.zip HTTP/1.1" 206 7460613 "http://www.finalhosting.com/files/all/" "FDM 2.x"
82.161.6.3- - [15/Jul/2007:20:36:41 -0400] "GET /files/all/cs_test_file.zip HTTP/1.1" 206 3730307 "http://www.finalhosting.com/files/all/" "FDM 2.x"
82.161.6.3- - [15/Jul/2007:20:36:41 -0400] "GET /files/all/cs_test_file.zip HTTP/1.1" 200 14921226 "http://www.finalhosting.com/files/all/" "FDM 2.x"
82.161.6.3- - [15/Jul/2007:20:37:01 -0400] "GET /files/all/cs_test_file.zip HTTP/1.1" 206 9285502 "http://www.finalhosting.com/files/all/" "FDM 2.x"
82.161.6.3- - [15/Jul/2007:20:37:02 -0400] "GET /files/all/cs_test_file.zip HTTP/1.1" 206 8322558 "http://www.finalhosting.com/files/all/" "FDM 2.x"
82.161.6.3- - [15/Jul/2007:20:37:55 -0400] "GET /files/all/cs_test_file.zip HTTP/1.1" 206 9154430 "http://www.finalhosting.com/files/all/" "FDM 2.x"
82.161.6.3- - [15/Jul/2007:20:37:55 -0400] "GET /files/all/cs_test_file.zip HTTP/1.1" 206 8322558 "http://www.finalhosting.com/files/all/" "FDM 2.x"
82.161.6.3- - [15/Jul/2007:20:37:55 -0400] "GET /files/all/cs_test_file.zip HTTP/1.1" 206 10895582 "http://www.finalhosting.com/files/all/" "FDM 2.x"
82.161.6.3- - [15/Jul/2007:20:37:59 -0400] "GET /files/all/cs_test_file.zip HTTP/1.1" 206 9652269 "http://www.finalhosting.com/files/all/" "FDM 2.x"

looks like more traffic than 14.2 MB (the filesize)

this was a request without the script...
« Last Edit: Jul 15, 2007, 08:32:37 pm by Olaf »

Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #30 on: Jul 16, 2007, 10:36:58 am »

I'm using this partially download script now without any db/ip check and it looks like that it is working right now.

there are too possibilities for the unnatural traffic:

the server gave back the wrong response on some direct request via the download manager

or

this fu_xxx_ing FDM (free download manager) is doing something wrong

(I hope it's the second Smiley)

I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 5799
46391 credits
Members referred : 3



« Reply #31 on: Jul 16, 2007, 11:39:43 am »

I think the problem is that the apache log file logs this traffic wrong. If the dl manager was using more bandwidth the downloads would be slower than by not using it Smiley

Trial and Error my two best teachers Cool
Join us @ facebook or twitter

Last blog : Butterfly Marketing 2.0
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #32 on: Jul 16, 2007, 11:43:58 am »

I think the problem is that the apache log file logs this traffic wrong. If the dl manager was using more bandwidth the downloads would be slower than by not using it Smiley

the DL manager splits the file into x parts, this way its possible to to download files faster if the downstream is lower on the target server.

the log above is from a DL without using a script, while using the script it's OK

Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=6882
Tags : php download Bookmark this thread : Digg Del.icio.us Dzone more....

Pages: 1 [2] Print 
Webdigity Webmaster Forums  >  Web Development  >  PhP
Topic: allow only one file for each IP
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 28, 2012, 10:07:30 pm





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!






Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2012 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.