PHP Forums Archive

Script Limit the number of downloads per client. Need Help

Tags: requirements, set_time_limit

souhunter posted on 2008-08-22 12:54:36 #

Hi Olaf. Thank you for the answer.
Perfect, in this case can put the set_time_limit anywhere in the script dl.php?

The link www.site.com / dl.php is only a reference.
My hosting service has the support php, because the script is running properly, access the database, all running well, only then, when accessed directly as in the example, www.site.com / dl.php he asks for save the script PHP. Yes, I see all the code.

Thank you for support.

Comments / discussions

Olaf posted on 2008-08-22 12:58:52 #

Hi,

put the "limit" before all code.

If you see the code, than your hosting doesn't support PHP, ask this your hosting provider.

delirious1230 posted on 2008-09-30 06:42:16 #

hello, i posted this on an other site...didnt get answer yet if its possible to help me here with it. olaf if its your script than wont be trouble i hope :)
Here is it:

<snipped reason="I know my script" />

script is working in half way

every time i download file it write this in database...
Image

I would like that every time that something is downloaded that update field downloaded or exempt... and that date would be correct...

Olaf posted on 2008-09-30 06:52:44 #

delirious1230,

I followed the post on webdigity and I agree with Nick, you can't ask the php community to write custom code for free. We are here to help you not to work for you (I have my own boss) ;)

delirious1230 posted on 2008-09-30 07:13:18 #

Well if its your code than you know the best how to and i think its not much
to fix up to get it right.. isnt that true...?!

Olaf posted on 2008-09-30 07:36:51 #

Quote from: delirious1230"Well if its your code than you know the best how to and i think its not much
to fix up to get it right.. isnt that true...?!"

how do you know? Nick is also a very experienced PHP user and we discussed this kind of function many times before he is right it takes an hour (or more, it depends on your own skills)

The script I have posted was has got tests about 3-4 hours so you think it's just adding some code, you're wrong :D

delirious1230 posted on 2008-09-30 07:40:58 #

For how much would you make it all right for me?!

Olaf posted on 2008-09-30 08:28:44 #

Quote from: delirious1230
"For how much would you make it all right for me?!"

it's still the one hour, my rate is €50,00/hour

delirious1230 posted on 2008-09-30 08:47:58 #

Well give me your msn if you want to earn something :)

Olaf posted on 2008-09-30 09:58:05 #

First I need a complete list of requirements (your post on webdigity is not really clear).

Pleast post the required information here or send it via the contact form

delirious1230 posted on 2008-09-30 10:14:13 #

Why its not possible to talk on msn i would explain faster and easier to be honest..

Olaf posted on 2008-09-30 10:25:52 #

Quote from: delirious1230
"Why its not possible to talk on msn i would explain faster and easier to be honest.."

I don't have the time to help, but a friend is (maybe) interested, thats why I need the details before.

delirious1230 posted on 2008-09-30 11:02:37 #

Well i need:
1. max downloads per ip for my site classes in sql
2. that peoples wont be possible to download direct from directory if not signed up on account

Olaf posted on 2008-09-30 11:51:07 #

and how is the authentication part done?

delirious1230 posted on 2008-09-30 13:46:44 #

what do you mean... that script i posted and u edited was different than original...
and its not much more needed to be done... as someone else said

Olaf posted on 2008-09-30 14:45:28 #

that peoples wont be possible to download direct from directory if not signed up on account

This function is not included in my code example.

since this is not related to this Topic please open a new one (I guess the thread owner is bored enough)

delirious1230 posted on 2008-09-30 15:21:07 #

Aha okey than without that, i will fix that problem later .

Olaf posted on 2008-09-30 15:31:28 #

so you want to limit the downloads per IP... thats what the tutorial describes :)

delirious1230 posted on 2008-09-30 15:40:40 #

Yep kinda like that but not like script do now... it save
number of downloaded files per one file... i would like to manage
for all files limit.... like from 1000 files i have....
i would have 20 files allowd to download... no mater which....
when i come to 20 it would say limit file of 20 has been reached or
something :P...

Olaf posted on 2008-09-30 15:51:20 #

maybe you can tell us first why you want to set a limit (still not clear what you're trying)

delirious1230 posted on 2008-09-30 15:53:48 #

I just want to limit downloaded files for user on his ip adress.
I would limit like 20 download per day for each user..
PS: Now i m off for 2 hours we talk later..cu