Wrox Programmer Forums
|
HTML Code Clinic Do you have some HTML code you'd like to share and get suggestions from others for tweaking or improving it? This discussion is the place.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the HTML Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 19th, 2005, 09:39 PM
Registered User
 
Join Date: Nov 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default URL INFO

Hi everybody,
I have an ASP/HTML website with SQL Server Database. Some of my friends websites have got a link to my website, and I was just wondering if there is any way to find out who visited my site....basically what url visited our site and how many times.

To be more clear.....I want something like this....if someone goes to my friends site and clicks my url(which is specified there as a link...using <a href=.....>) then the url address of my friends site should be recorded in my database.....and counter should be 1....and so on.....
just to keep track of the users visiting my website from other sites and the ones directly going to my site.
Any help would be much appreciated....
Thanks for concern.
 
Old January 20th, 2005, 03:01 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

If you're using ASP, you can use the HTTP_Referer, like this:

Dim previousSite
previousSite = Request.ServerVariables("HTTP_REFERER")

(Note the spelling mistake in referer)

Be aware that the referrer is not very reliable. Many Internet Security / Privacy systems block the referrer, so it looks like people typed in your address directly, while it's quite possible they came from your friend's site.

If you can control the link on the other sites, you can pass a unique identifier, e.g.:

<a href="http://www.YourSite.com/Index.asp?FROM=Friend1">

other sites can then use Friend2, Friend3 and so on.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.





Similar Threads
Thread Thread Starter Forum Replies Last Post
URL Redirect based on given URL somnath.kartic VS.NET 2002/2003 1 August 2nd, 2012 08:21 AM
URL rewriting with URL forwarding mtabyana BOOK: Professional Search Engine Optimization with PHP: A Dev's Guide to SEO ISBN: 978-0-470-10092-9 0 October 22nd, 2007 08:22 AM
URL Info -- Need Help knowledege Classic ASP Databases 1 January 20th, 2005 12:17 AM
extract URL from Favorites (.URL Files) PhilHawks VB.NET 2002/2003 Basics 2 November 2nd, 2004 04:35 AM
Where would I get info on how to download info aidanc ASP.NET 1.x and 2.0 Application Design 1 September 29th, 2003 02:45 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.