473,486 Members | 1,733 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

referer in a frame

I need to make a little software to know how many visitors see my websites,
and where they come from.
So I've added this code at the end of a webpage:

<!------- Begin Stat code ------------->
<script language="JavaScript">
var path = 'http://www.mysite.com/webform1.aspx';
document.write('<img height=1 width=1 border=0 src="');
document.write(path);
document.write('?referer=');
document.write(escape(document.referrer));
document.write('">');
</script>
<noscript>
<img height=0 width=0 src=path>
</noscript>
<!------- End Stat code ------------->

I have an asp.net page (webform1.aspx) that is executed by this script and
it records all the information I need.
I think everything is ok, but the page I want to count is on
www.geocities.com and it fills users webpages in frames to show advertising.

in my database it saves:
page=http://www.geocities.com/site/?20057
referer=http://www.geocities.com/site


I think because for geocities "site/?20057" is my html page in wich I put
the javascript, and "site/" is the main page with javascript.
Am I right?
How can I record the real referrer?

Please help me...

--

Giuseppe


Jul 23 '05 #1
3 5605
Giuseppe wrote:
I need to make a little software to know how many visitors see my
websites, and where they come from.
I don't know any web server which doesn't do that by default. Why not just
grep your server logs?
in my database it saves:
page=http://www.geocities.com/site/?20057
referer=http://www.geocities.com/site


I think because for geocities "site/?20057" is my html page in wich I put
the javascript, and "site/" is the main page with javascript.
Am I right?
How can I record the real referrer?


That is the real referrer - you want the referer's referer, which the
browser doesn't provide you with available.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 23 '05 #2
"David Dorward" ha scritto nel messaggio
Giuseppe wrote:
I need to make a little software to know how many visitors see my
websites, and where they come from.


I don't know any web server which doesn't do that by default. Why not just
grep your server logs?
in my database it saves:
page=http://www.geocities.com/site/?20057
referer=http://www.geocities.com/site


I think because for geocities "site/?20057" is my html page in wich I put the javascript, and "site/" is the main page with javascript.
Am I right?
How can I record the real referrer?


That is the real referrer - you want the referer's referer, which the
browser doesn't provide you with available.

with "document.write(escape(parent.document.referrer)); " maybe it is ok!
--

Giuseppe
Jul 23 '05 #3
"Giuseppe" ha scritto nel messaggio
with "document.write(escape(parent.document.referrer)); " maybe it is ok!
--

....unless the referre is a geocities page itself.
I can't understand why.
Jul 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
2793
by: Joshua Beall | last post by:
Hi All, I do web design for some small organizations, and one of the sites I have set up takes online conference registrations. Now, most of the time it works. In fact, every time I try it, it...
1
2114
by: jawahar rajan | last post by:
All, I have a question about the Max Referer length. By default this is 256 I am not fully sure I understand this property. It this a header that is sent back to the Server by a client and is it...
2
12617
by: Jonathan Driller | last post by:
I am attempting to block repeat downloads from a site. I need to have a landing page pass a referer to a secured page. I have tried a meta refresh redirect and several Javascript redirect...
3
6086
by: exxos | last post by:
Hi all, I'm trying to list to a html page where the referer is, There are a lot of ways ive tried and work, but the problem if my mainpage uses frames, and no matter where I do the referer check...
1
2053
by: Raed Sawalha | last post by:
Hello: In my aspx page I need to check the HTTP_REFERER for (images swf ) file, so when I request the server variable (HTTP_REFERER) like this Request.ServerVariables within (page.aspx) . if the...
4
4007
by: Raed Sawalha | last post by:
Dear : In my web page I'm always checking the referer page if it was empty I do something else also I do something :0). the problem in my ASPX page client side I did a popup window, and when...
1
2226
by: Al | last post by:
Hi i'm having troble with a script where i check referer, on a PC with Zone Alarm Pro the referer isn't send... i did a couple of page of testing and no referer is sand, closing ZAP the...
0
1101
by: j2lane | last post by:
im using frameset in an aspx page, which top frame is index.html and bottom one is footer.html. when a button in footer clicked, there is a pop up window pops, which i need to detect the previous...
4
6651
by: pavloutefkros | last post by:
Hello all! I was wondering, if there is a way to retrieve the referer url with python (web-based). I tried this: import os print os.getenv('HTTP_REFERER') but it's not working, even...
0
6964
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...
0
7123
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,...
0
7305
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5427
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4559
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...
0
3066
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1378
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 ...
1
598
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
259
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.