Jump to content

catch a url link


westman

Recommended Posts

Guest So Called
One way to "catch" a link would be to get the referring site to tag your link .
I'm curious what you mean by this. If the browser is providing referrer information the link will be there. I don't know of any tag that will provide more info if the browser isn't sending a referrer header.
Link to comment
Share on other sites

By tag I mean pass info with the GET array though I haven't used it that way yet.

Link to comment
Share on other sites

Guest So Called
By tag I mean pass info with the GET array though I haven't used it that way yet.
OIC! In my case of interest in referrers the sites would not be able to cooperate. Most of my referrals are search engines. I presume the visitors who land on my site (particularly directly to content pages) were referred by search engines but the visitor has their referrer disabled. All the big search engines provide a wealth of information in a query string including in many cases the exact search terms. Very nice!
Link to comment
Share on other sites

Guest So Called

It is not us who are missing the point. It is your fault for not explaining what you want. I think we can forgive you because it appears that English is not your native language. Use this in your script: $_SERVER['HTTP_REFERER'] That array element will contain the URL of the site that had a link to your site. This is the same information that you can see in your logs under the "referrer" column.

Link to comment
Share on other sites

Guest So Called
given that example
$ref = $_GET['uri']

Or you can use this method if the site sending you traffic can add the information for you.
Link to comment
Share on other sites

ok sorry for not giving more info.... i will give a html block like... <p> <a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0 Transitional" height="31" width="88" /></a> </p>to link with my site. more that 1 site will have this link so i need to know witch site is sending me refferels.

Link to comment
Share on other sites

Guest So Called

That's going to link to validator.w3.org, not to your site. Okay I'm trying to psych what your problem is. Is it this? Let's say you have three sites that link to your site, tom.com, sam.com and harry.com, and your site is example.com. The link on tom.com will be <a href="example.com?url=tom.com>...</a> The link on sam.com will be <a href="example.com?url=sam.com>...</a> The link on harry.com will be <a href="example.com?url=harry.com>...</a> On your site in your index script you'll use $_GET['url'] to see which site linked to you. It will be equal to 'tom.com' or 'sam.com' or 'harry.com' depending on which site's link was clicked. Is that what you wanted to know?

Edited by So Called
Link to comment
Share on other sites

Guest So Called

Okay I just clicked the link that I posted above. Not surprisingly it gets a link to the page we are both on. Being a PHP genius ( ;)) I can tell you that w3.org ignored the ?uri=referrer part of the link and instead they used $_SERVER['HTTP_REFERER'] in their script that catches the page request. Because that's the only way it could possibly be working.

Link to comment
Share on other sites

Guest So Called
Okay I can see now more about what is happening. Neither of the above works. Conclusion: The query string ?uri=referer tells the validator to use the referrer string sent by the browser as the URL to be validated. It is getting that from $_SERVER['HTTP_REFERER'] if they are using PHP. Another experiment: Paste the entire URL into a new browser window and try that. You'll get this error message from w3.org: "No Referer header found!" That proves that they are using the "referer" header when you have ?url=referer in the link, because it fails when there is no "referer" header. (The correct spelling is "referrer" but due to the first guy who designed it being an idiot he misspelled it "referer" and it's been too complicated to fix his original mistake. It's the programming equivalent of the dummy who thought electricity current flowed from + to - because they didn't know what electrons were back then, so now we have current flow and electron flow in the opposite directions. But I digress...) ;)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...