I need to build some referrer checking into a existing php page that I have. What I need it to do is the following: - Look at the referrer if there is one The referrer if there is one will be http://cgi.ebay.com/Test-Auction-Do...oryZ1337QQssPageNameZWDVWQQrdZ1QQcmdZViewItem http://cgi.ebay.co.uk/Mens-Sunglass...yZ131411QQssPageNameZWDVWQQrdZ1QQcmdZViewItem http://cgi.ebay.ca/XBox-360-Halo-3-...tcZphotoQQssPageNameZWDVWQQrdZ1QQcmdZViewItem What I need to do is be able to strip out the ebay.ca or ebay.co.uk or ebay.com and set another variable based upon which one it is. Thank you for your help.
You can try something like this: $domain = parse_url($_SERVER['HTTP_REFERER'], PHP_URL_HOST); PHP: Then just create a switch or if/else statements to execute what you want for each variant of $domain. Hope this helps