How To Prevent Hotlinking With PHP
Hotlinking is the act of one site embedding content (such as images, audio files, and videos) hosted on another site. This uses up the ‘bandwidth’ (data transfer allowance) of the site hosting the file, which can be very expensive for webmasters who pay for hosting by the amount of data transferred — as a result, hotlinking is often called ‘leeching’ or ‘bandwidth theft’.
Hotlinking can be prevented using the .htaccess file on an Apache web server, but cheaper web hosting packages often don’t allow webmasters to change this file. The code shown below allows webmasters to prevent hotlinking entirely from within PHP (without .htaccess), which is supported by most web hosting packages. As well as preventing hotlinking the code also allows the site to benefit from direct links (when a site links to content on another site but doesn’t embed it).
SECURITY - How To Prevent Hotlinking With PHP
| SECURITY - How To Prevent Hotlinking With PHP |
| Article | |
|---|---|
|
|
|
| casimedicos [ Wed 04 Jul, 2007 00:14 ] | |
Sponsors![]() |
|
| SECURITY - How To Prevent Hotlinking With PHP |
| Comments | |
|---|---|
|
|
|
| casimedicos [ Wed 04 Jul, 2007 00:17 ] | |
|
|
|
| casimedicos [ Wed 04 Jul, 2007 00:19 ] | |
|
|
|
| casimedicos [ Wed 04 Jul, 2007 00:20 ] | |
|
|
|
| Mighty Gorgon [ Wed 04 Jul, 2007 00:49 ] | |
|
|
|
| casimedicos [ Wed 04 Jul, 2007 01:07 ] | |
|
|
|
| archan [ Sun 31 Oct, 2010 15:22 ] | |
|
|
|
| topman26 [ Wed 03 Nov, 2010 09:15 ] | |
Was this topic useful? |
|
Page 1 of 1 |
This is a "Lo-Fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by Icy Phoenix based on phpBB
Design by DiDiDaDo
Generation Time: 0.2011s (PHP: 26% SQL: 74%)
SQL queries: 17 - Debug On - GZIP Enabled















