|
|
|
| Title : |
Check whether your referer is coming from your website or from someone
else's.
Very useful when you want to represent the data without your domain
name for internel link-mapping in some COUNTER. |
| Categories : |
PHP, HTTP |
 Maxim Maletsky |
| Date : |
Aug 22nd 2000 |
| Grade : |
2 of 5 (graded 2 times) |
| Viewed : |
8471 |
| File : |
No file for this code example. |
| Images : |
No Images for this code example. |
|
| Search : |
More code by Maxim Maletsky |
|
| Action : |
Grade This Code Example
|
|
| Tools : |
My Examples List |
|
|
|
|
|
|
Check whether your referer is coming from your website or from someone's else. If he was
referred to you from one of your pages then this function will remove your Domain Name from
the full URL and so you could then sort the results..
Very useful when you want to represent the data without your domain name for internel link-
mapping in some COUNTER.
Here's the code:
<?
// Feel free to change the code as you wish.
// like first $HTTP_REFERER in the first line below
// could also be a variable already proccessed
// by one of your previouse functions.
if (substr ($HTTP_REFERER, 0, (strlen($HTTP_HOST) + 7)) == "http://".$HTTP_HOST)
$yourURL =substr ($HTTP_REFERER, (strlen($HTTP_HOST) + 7));
// Maxim Maletsky
// maxim@j-door.com
// J-Door.com
?> |
|
| Remote File Saving with PHP - Download and serve a remote file. The content of the file will be updated at fixed intervals. Categories : PHP, Filesystem, Cache, Sockets, HTTP | | | Gets the browser and OS from the $_SERVER['http_user_agent'] variable in PHP Categories : PHP, HTTP, Regexps | | | A function to check if a URL exists Categories : PHP, CURL, HTTP | | | PHP4 HTTP Compression Speeds up the Web Categories : PHP, Zlib, HTML and PHP, HTTP, Network | | | WebServerSpy checks which kind of Webserver is running, Apache, Netscape, Fasttrack, IIS, HTTP-Header, HTTP 1.0, GET, spy, WWW Categories : HTTP, Network, Apache, PHP, Web Servers | | | Simple pipe delimited file export program that downloads to a local machine Categories : PHP, Filesystem, Databases, MySQL, HTTP | | | ServerInfo - Remotely identify the software a web server is running. Create yourself a mini Netcraft :) Categories : PHP, HTTP | | | Authentication HTTP protocol POST Categories : Authentication, HTTP, PHP | | | This gets the http response headers for a given url and returns them in an assoc array. i.e. to test if a url exists: $array = get_http_headers($url); if($array[result]=200) { } Categories : HTTP, Arrays, PHP | | | Remote File Size Categories : PHP, Filesystem, HTTP, Sockets | | | Class that allows the PHP developer to create and manage UNIX like password files suitable for use as Apache authentication password files.
Categories : HTTP, PHP, PHP Classes, Filesystem | | | How to force the user to download a file instead of opening it up in an
controlled environment within the browser (i.e. MS Word/Adobe Acrobat) Categories : Browsers, PHP, HTTP | | | This script shows you the 7th latest php items from the mailing list archive on zend.com Categories : HTML, HTML and PHP, HTTP, PHP | | | Gonx Proxy - This class is meant to act as an HTTP proxy to serve pages of a remote server as if they were local pages.
Categories : PHP, PHP Classes, HTTP | | | The first step Guest Book ... ^^ Categories : MySQL, PHP, Apache, HTML, HTTP | |
|
|
|