Jump to content

how file accessed


The Little Guy

Recommended Posts

Directly meaning someone requested that file versus you including it or something via another file?

 

It's called hot linking.  If you don't want a file to be accessed directly, move it outside of the public area of your webserver:

 

You probably have files here: /home/TLG/public_html/your_files_here_or_in_some_folder

 

Move them to: /home/TLG/some_folder/public_html

 

They cannot link directly to them in that case.

Link to comment
https://forums.phpfreaks.com/topic/138904-how-file-accessed/#findComment-726350
Share on other sites

Javascript is client side so it cannot access a file outside of the public area.

 

I know.

 

That is why I am looking for a way in the php file that checks to see how the file was accessed. if it was accessed from my file then allow it to run otherwise skip to the end and exit.

Link to comment
https://forums.phpfreaks.com/topic/138904-how-file-accessed/#findComment-726372
Share on other sites

Because I don't want someone to go to the specific page and press refresh 500 times to boost their site hits.

 

Session and or cookies would be your best bet IMO. Although these are bypassable not many people know how to bypass it. You can also do an IP deal. if the IP has hit more than 5 times in x minutes or x seconds then inform them of the infringement and that their stats are now under investigation and may be altered.

 

Just remember that unique hits are not always accurate cause it is hard to know who is legit and who isn't.

Link to comment
https://forums.phpfreaks.com/topic/138904-how-file-accessed/#findComment-726490
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.