473,659 Members | 2,681 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Linking back to specific referrer sites... How to?

Haitashi
96 New Member
There are many ways to reach my site. But I what I'm trying to accomplish is to test if the user comes back from 3 specific sites. If they are linking to my site from theirs, I want to store that info in a variable to dynamically create a URL that links back to that original site.

I was thinking that I could use CGI.http_referr er and somehow test if it contains specific URL info. And if it contains any of those 3 sites then save the content to a variable.

Can I even test of specific text exists as part of CGI.http_referr er? I also think that I need to test for the domain and have it completely ignore any sub directory (so that blabla.com & blabla.com/home/ would both come back as 'true' if I test it for the blabla.com string).

Any suggestions?
May 22 '08 #1
4 2660
acoder
16,027 Recognized Expert Moderator MVP
Use it as a string. Use a combination of string functions (find, refind, left, mid, etc.) or perhaps someone has already written a UDF over on cflib.org
May 23 '08 #2
Haitashi
96 New Member
Thanks. Even though your suggestion worked (I saved the referrer info and would do a find. If it found any piece of the URLs I needed, then it would set a variable to contain that info).

Even though in theory this should work. However, we would sometimes end up with unreliable information inside the referrer and this would cause errors. Mostly from users using the BACK and FORWARD button to navigate around.

I decided not to implement this feature until I find a safe and proved method to do it. Thanks anyways!
May 29 '08 #3
acoder
16,027 Recognized Expert Moderator MVP
Yes, cgi.http_refere r is unreliable. It's even spelt incorrectly! The user can spoof or disable it or the firewall can block it. Not something that can be relied upon.
May 29 '08 #4
Haitashi
96 New Member
I've decided to abandon this idea for now. If I do find a reliable way, I'll post back.
Jun 10 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

7
2185
by: George Hernandez | last post by:
I have a site on a set of Linux Servers where my site is PHP enabled and I would like to prevent people from externally linking to content on my site and replace it with a warning image. I've researched the following to put in an .htaccess file on teh root of my server, but none of the methods or changes or suggestions I've found on the web work... ============================================================ RewriteCond %{HTTP_REFERER}...
3
1802
by: riotctrl | last post by:
Is there a way to use the history.back to display the actual url of the last page to the page ?
27
3094
by: Lee Phillips | last post by:
I believe it is universally accepted that decorating your website with images from someone else's, without permission, is rude and unethical, even if the images are in the public domain, because to do so is to steal bandwidth. But I have run across a situation where people are linking to other types of resources that I offer on my website without my permission, and I was interested to know if there is a consensus on the ethics of this...
1
1206
by: paddy | last post by:
I keep digging through tut after tut and I find lots and lots of C++ logic, but I can't find any straight forward plain and simple info on the whole linking and library process. Can anyone recommend a good source to digest that covers what is going on in this regard? I can get things to work with the 'monkey see' technique but it is still all voodoo. I need to understand things like, how make files work, how vc++6 project files work,...
2
2370
by: Goober | last post by:
I have to determine the document.referrer of the individual coming to my site. I want to send everyone not coming from one of those sites to an alternate location (The names below are just used as examples). I want to match on one of those names anywhere in the document.referrer. In the main program I call a subroutine like this: <script LANGUAGE="javascript" SRC="../js/redirect.js"></script> <body leftmargin="0" rightmargin="0"...
5
2428
by: Dani | last post by:
Hello everybody, I have some code that disables form elements on body load, but I notice when I hit the "back" button, I need to re-enable the form elements (that is done by clicking on a radial button). Is there any way I can keep the form for disabling every time a user hits the back button and "remember" what elements should be enabled? I was thinking maybe utilizing some referrer thing, but I'm not that good with JS yet. Thanks...
33
4063
by: randau | last post by:
Linking to a Targeted Browser Window I'd like to open reference links to other web sites in a separate browser window from the browser window hosting my own web site pages. The Link Target reserve word "_blank" opens a blank new browser window for every link, which can sometimes result in a lot of open browser windows. Is there no way to "reuse" a previously linked browser window and have it load the new web page in Foreground
0
7183
by: Tarik Monem | last post by:
I have been working on an all AJAX/DOM web site which is set to go live today and I thought I'd share my discoveries with all of you whom have helped me when I have encountered different issues along the way. First, deep linking is not something that a completely AJAX web site should be able to do by it's very nature of everything being on one page basically. So how can a person deep link to something that is on one page? This question...
2
1772
by: Bishop | last post by:
I want to determine referrer website when someone comes to my page. Since the link URL has to be static between sites (i.e. I can't use something like mysite.com?refid=14 to determine who linked to me) I'm guessing I need to read the referrer. My only concern is if the link to my site is from another website will I always get the referrer or are there browsers that won't give that information? I don't need referrer if someone types it...
0
8428
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8339
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8851
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8751
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8535
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6181
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5650
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2757
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1982
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.