GetDotted Domains

Viewing Thread:
"PHP + Hotlinking"

The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.

Fri 20/08/10 at 20:51
Regular
Posts: 1
Hey Guys,

Sorry if this has been posted before, but say if i have a directory on the server which i upload to pdf files and i have a simple php login script how can i make it so only ppl that login in with the username and password can access those files, because i cant embedded a php script into the pdf files to validate the user sessions?

Thnx

Olly
Fri 20/08/10 at 22:37
Regular
"Devil in disguise"
Posts: 3,151
You can use php to serve the pdf files, like..


header('Content-type:application/pdf');
readfile('my.pdf');


And then you can keep your directory with pdf files outside the document root or protect the directory with htaccess so the pdfs arent accessible directly.
Fri 20/08/10 at 20:51
Regular
Posts: 1
Hey Guys,

Sorry if this has been posted before, but say if i have a directory on the server which i upload to pdf files and i have a simple php login script how can i make it so only ppl that login in with the username and password can access those files, because i cant embedded a php script into the pdf files to validate the user sessions?

Thnx

Olly

Freeola & GetDotted are rated 5 Stars

Check out some of our customer reviews below:

The coolest ISP ever!
In my opinion, the ISP is the best I have ever used. They guarantee 'first time connection - everytime', which they have never let me down on.
Everybody thinks I am an IT genius...
Nothing but admiration. I have been complimented on the church site that I manage through you and everybody thinks I am an IT genius. Your support is unquestionably outstanding.
Brian

View More Reviews

Need some help? Give us a call on 01376 55 60 60

Go to Support Centre

It appears you are using an old browser, as such, some parts of the Freeola and Getdotted site will not work as intended. Using the latest version of your browser, or another browser such as Google Chrome, Mozilla Firefox, or Opera will provide a better, safer browsing experience for you.