monkeytooth Posted June 4, 2011 Share Posted June 4, 2011 I am looking for one of two things either is fine. One is either a premade class to work with or the other is a means of making my own script, just needing to know where I should start with it. What I have is one main domain, where I have redirected I dunno another 30-40 domains or so towards that I have had collecting dust for I don't know how long. Some I am looking to resell, some I am looking to do stuff with eventually but whatever the case on the main domain they all point to I would like to device a script that can tell me where if any referring/redirected sites are landing on the main domain. The whole tracking bit I plan to do I can handle and the various other things this may imply I can deal with also. I know theres a simple $_SERVER[] function I can make use of. But my question is, is it really that simple? Another thing I would like to try and track through a similar concept is if people are coming from google, bing, stumbleupon, other.. and if they contain keywords I would like to snag that as well.. Suggestions, Advice, Hints, tips, tricks what ever I am open to.. Quote Link to comment Share on other sites More sharing options...
WebStyles Posted June 4, 2011 Share Posted June 4, 2011 when your 30+ domains are redirected to the main domain, does the domain name change in the browser? (what I'm getting at here is, if the domain name does not change, then you just need to grab that and redirect to a folder or do something with it, if it does change then you grab the referrer and do the same.) Anyway you look at it, you answered the question yourself, the answer is in the $_SERVER variable and it's a very simple process. Hope this helps Quote Link to comment Share on other sites More sharing options...
monkeytooth Posted June 4, 2011 Author Share Posted June 4, 2011 It redirects completely.. if you go to domain1.com domain2.com domain3.com they will then be redirected to maindomain.com and change said URL in the address bar. But thank you for confirming the $_SERVER bit wasn't sure if it was going to be that easy lol. Can the same $_SERVER thing be used to catch something like: http://www.google.com/search?rlz=1C1CHKZ_enUS430US430&aq=f&sourceid=chrome&ie=UTF-8&q=monkey+pop#sclient=psy&hl=en&rlz=1C1CHKZ_enUS430US430&source=hp&q=php+freaks+forums&aq=f&aqi=g1g-v1&aql=&oq=&pbx=1&bav=on.2,or.r_gc.r_pw.&fp=6782d3fc39a1f682&biw=1280&bih=896 So I can script around it and find out what the q= portion of that URL would be (i know working with the string to get the q= is something entirely different) Quote Link to comment Share on other sites More sharing options...
WebStyles Posted June 4, 2011 Share Posted June 4, 2011 check out the $_SERVER vars page on php.net, and you'll see all the options there. some options will grab the page name, some will grab the domain, some will grab the variables. hope that helps. Quote Link to comment Share on other sites More sharing options...
monkeytooth Posted June 4, 2011 Author Share Posted June 4, 2011 that does indeed, thank you. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.