It appears you have not yet registered with our community. To register please click here.

Origin XT RPG Network Home







XT Project Introduction
Blah blah intro to this place. To be composed later.

have this thing..., need help with it...


Aug 1 2006, 06:35 PM (Post #1)
Peasant

Posts: 22
Cash: 9,001 / 0
Group: Newbie
Joined: 7/30/06 05:17 PM
ok here the thing.

i have IPB 1.3

in my forum there is this page that i made for vip members only.
now in that page i post download links only for vip members but the problem that the
vip members leech the links to non vip members, and they download too.
i want that in the vip page everytime a vip member enters to download someting the
download link changes auto after the first download.
it is like random download link or unique download link.
example:
i am a vip member i enter the vip page and i want to download something i press on the
download link wich is:
http://www.domain.com/forum/index.php?act=...id=1&url_id=132

look at the vars there:
?act=vip - is the vip members only page
&download_id - is the id of the download
&url_id - is the unique id of the url

after i press it and download the link is automatically dies.
now if i press the link again it wont download.

if i want to download again that i have to refresh the page and i get a new download link for the same download like this:
http://www.domain.com/forum/index.php?act=...id=1&url_id=133

and so on...

this is very importent to me and i will be very thankfull to who will help me.
i will publish his site in myn and in dozens others.

and if it is possible to recored the times a member downloaded in one day and after X download in a day
it wont let him download again.

tnx alot.
Post Options

 
Aug 1 2006, 09:18 PM (Post #2)
Not Odd anymore
* * * * * * * * * *
Posts: 45,875
Cash: 1,915,578 / 1,817,041,051
Group: Administrator
Joined: 7/10/02 09:48 PM
I don't see how members can download from categories they can't view. How about a permissions check on the script that serves the download?
Post Options

Aug 2 2006, 09:08 AM (Post #3)
Peasant

Posts: 22
Cash: 9,001 / 0
Group: Newbie
Joined: 7/30/06 05:17 PM
if those members that cant view the cat doesnt mean that they cant recive the direct download url from a vip member.
thats why i want a unique download link evrytime the page reloads.
tnx
Post Options

Aug 2 2006, 07:36 PM (Post #4)
Not Odd anymore
* * * * * * * * * *
Posts: 45,875
Cash: 1,915,578 / 1,817,041,051
Group: Administrator
Joined: 7/10/02 09:48 PM
How about a permissions check with a PHP file? So you have index.php?download=file.zip, and before it outputs the requested file, it checks for permissions
Post Options

Aug 2 2006, 07:46 PM (Post #5)
Peasant

Posts: 22
Cash: 9,001 / 0
Group: Newbie
Joined: 7/30/06 05:17 PM
that would do it!!!
can u tell me how to do this?
i will be very thankgfull

and another thing i made a form that adds afile into the database everything is working fine.
i just dont know how to use the <input name="file"> thing a user selects afile from his computer to upload but how can i actually upload it to a directory in my forum?
and then that a member could acctually download it.

tnx alot.
Post Options

Aug 2 2006, 07:52 PM (Post #6)
Not Odd anymore
* * * * * * * * * *
Posts: 45,875
Cash: 1,915,578 / 1,817,041,051
Group: Administrator
Joined: 7/10/02 09:48 PM
<input type="file" name="myfile[]" size="40" />

Something like that. Use move_uploaded_file() to save the file onto your server. Check PHP Manual's function list for syntax and examples.

As for the downloads thing, just upload the files via your post attachment form. Only those who can see the topic can download using that URL.
Post Options

Aug 2 2006, 07:54 PM (Post #7)
Peasant

Posts: 22
Cash: 9,001 / 0
Group: Newbie
Joined: 7/30/06 05:17 PM
i am not using the download thing inside a topic.
and i dont use attachments.

and i didnt understand this:
<input type="file" name="myfile[]" size="40" />
Post Options

Aug 2 2006, 09:20 PM (Post #8)
Not Odd anymore
* * * * * * * * * *
Posts: 45,875
Cash: 1,915,578 / 1,817,041,051
Group: Administrator
Joined: 7/10/02 09:48 PM
Then forget it. I can't be bothered teaching a whole aspect of a language. I told you; use PHP's function definition list.

Use attachments.
Post Options

Aug 3 2006, 01:58 PM (Post #9)
Peasant

Posts: 22
Cash: 9,001 / 0
Group: Newbie
Joined: 7/30/06 05:17 PM
at least tell me how to make this:

"How about a permissions check with a PHP file? So you have index.php?download=file.zip, and before it outputs the requested file, it checks for permissions "
Post Options

Aug 3 2006, 08:27 PM (Post #10)
Not Odd anymore
* * * * * * * * * *
Posts: 45,875
Cash: 1,915,578 / 1,817,041,051
Group: Administrator
Joined: 7/10/02 09:48 PM
o_O There's no way I can tell you that in a post.

Like I said, why don't you use the attachment system?
Post Options

Aug 7 2006, 01:43 AM (Post #11)
Here for the cute boys ;)
* * * * * * * * *
Posts: 16,853
Cash: 9,337,572 / 95,912
Group: Nobility
Joined: 5/08/05 04:11 AM
Email each other, darn it...
Post Options