Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,254
Total Threads: 80,792
Total Posts: 566,472
There are 1592 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Design and Development     Programming     PHP and MySQL :

Help needed on e-Learning site design

Thread title: Help needed on e-Learning site design
Reply    
    Thread tools Search this thread Display Modes  
09-28-2009, 04:37 AM
#1
xecute is offline xecute
Status: I'm new around here
Join date: Aug 2009
Location:
Expertise:
Software:
 
Posts: 2
iTrader: 0 / 0%
 

xecute is on a distinguished road

  Old  Help needed on e-Learning site design

I'm pretty new to website development. Now a client has asked me to develop a e-Learning website. His requirement is the contents would be posted on the website and a user can pay money to access a specific module. The problem is the contents are in ppt. The contents should be restricted from normal access. Only a payed user should be able to see the content. Even if I apply some restrictions once some one finds the url for the ppt, then anyone can use the url to access that file. Could some one explain me how sites like rapidshare protect their files?

Reply With Quote
09-29-2009, 01:47 AM
#2
raghunathj is offline raghunathj
Status: I'm new around here
Join date: Apr 2009
Location:
Expertise:
Software:
 
Posts: 3
iTrader: 0 / 0%
 

raghunathj is on a distinguished road

  Old

Its very easy. Use a session instead of direct download.
Like here is the ppt location
www.mysite.com/file1.ppt

So now only registerd user must access. So when the user logs in set a session like $_SESSION['download'] = 1
then dont allow the user directly download the file.ppt
Create a DB with the file location and
create a file called download.php
and in that download.php create a if loop like
if( $_SESSION['download'] == 1){
here query the DB with download location and pull the file
}
else
{
You have no permission to download this file
}

Thats all. Hope it helps you

Reply With Quote
09-29-2009, 03:05 AM
#3
xecute is offline xecute
Status: I'm new around here
Join date: Aug 2009
Location:
Expertise:
Software:
 
Posts: 2
iTrader: 0 / 0%
 

xecute is on a distinguished road

  Old

@ "raghunathj" thanks for the reply
"then dont allow the user directly download the file.ppt"

How do I do that.Lets say I do whatever you say. Once a user registers and downloads a ppt via download.php, he will know the location of the file. After he may give that url to any person, so that anyone can download that ppt directly without going through download.php. My questions is even if someone know the direct url like "www.mysite.com/file1.ppt" and try to download, the request must be sent to download.php first. Could you tell me how to do it?

Reply With Quote
10-25-2009, 11:23 AM
#4
night_day is offline night_day
Status: I'm new around here
Join date: Oct 2009
Location: Toronto
Expertise:
Software:
 
Posts: 9
iTrader: 0 / 0%
 

night_day is on a distinguished road

  Old

The answer previous explained it already. If you set the session when a user logs in, when someone tries to access the download link, the session variable won't exist, so when you are writing the condition on the download page, check the session, if it doesn't exist, don't allow the download to occur.

At the end of the day, someone could simple email the ppt around anyways.

Reply With Quote
10-31-2009, 01:12 PM
#5
versatileshikha is offline versatileshikha
versatileshikha's Avatar
Status: I'm new around here
Join date: Oct 2009
Location:
Expertise:
Software:
 
Posts: 12
iTrader: 0 / 0%
 

versatileshikha is on a distinguished road

  Old

Following Code must be helpful for you.

$_SESSION['download'] = 1
then dont allow the user directly download the file.ppt
Create a DB with the file location and
create a file called download.php
and in that download.php create a if loop like
if( $_SESSION['download'] == 1){
here query the DB with download location and pull the file
}
else
{
You have no permission to download this file
}

Reply With Quote
Reply    


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed