|
||||
|
Hi folks,
I need a script which enables me to refer users to a specific websites according to a parameter. Example: URL of page with script: www.abc.de/page.php?out=vareside.com Refered to URL: www.vareside.com How to do this? Tutorials, links, snippets or hints are welcome. |
|
||||
|
I have been looking at this one and it would depend upond your version of php.
the foreach construct in php 4 gives an easy way to iterate over arrays. foreach works only on arrays, and will issue an error when you try to use it on a variable with a different data type or an uninitialized variable. Unless the array is referenced, foreach operates on a copy of the specified array and not the array itself. foreach has some side effects on the array pointer. Don't rely on the array pointer during or after the foreach without resetting it. Reference of a $value and the last array element remain even after the foreach loop. It is recommended to destroy it by unset(). You will get extremely hard-to-find bugs if you leave out the unset(). $_GET['id'] In PHP 4.2.0 and later, the default value for the PHP directive register globals is off. To get DOCUMENT_ROOT you'll use $_SERVER['DOCUMENT_ROOT'] substr Returns the portion of string specified by the start and length parameters. substr($site, 4, -1); If start is negative, the returned string will start at the start 'th character from the end of string. If start is non-negative, the returned string will start at the start 'th position in string , counting from zero. so I'm not understanding the 4. |
|
||||
|
Here is a Java IP (InetAddress) Locator from SourceForge
Java and ColdFusion libraries to lookup country code and language from IP address. It uses a local copy of the WHOIS database to perform fast, accurate lookups of country codes. Useful for log analysis, internationalization, geolocation, etc.. http://sourceforge.net/projects/javainetlocator/ How about taking the variables from the script and passing them to a php file to process the reffer site. Most people have java turned on, you would only miss out on private servers. And why not set a cookie so when they return you can process them. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|