Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Get page from where the users come
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Get page from where the users come

 Post Reply Post Reply Page  12>
Author
eagle00789 View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 24 March 2003
Location: Netherlands
Status: Offline
Points: 132
Post Options Post Options   Thanks (0) Thanks(0)   Quote eagle00789 Quote  Post ReplyReply Direct Link To This Post Topic: Get page from where the users come
    Posted: 30 March 2003 at 1:41pm

How to get the pageurl from where the users are comming to fill out a special page with the coming from already filled in.
it has to be limmited to pages inside my webpage

greetings chris

Using forum at Gravenrode and here and here
Back to Top
michael View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
Post Options Post Options   Thanks (0) Thanks(0)   Quote michael Quote  Post ReplyReply Direct Link To This Post Posted: 30 March 2003 at 2:38pm
you can use the Request.ServerVariables("HTTP_Referrer") if it has been send there by a link or so.
Back to Top
eagle00789 View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 24 March 2003
Location: Netherlands
Status: Offline
Points: 132
Post Options Post Options   Thanks (0) Thanks(0)   Quote eagle00789 Quote  Post ReplyReply Direct Link To This Post Posted: 30 March 2003 at 2:45pm

thx
wil try it now

greetings chris

Using forum at Gravenrode and here and here
Back to Top
eagle00789 View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 24 March 2003
Location: Netherlands
Status: Offline
Points: 132
Post Options Post Options   Thanks (0) Thanks(0)   Quote eagle00789 Quote  Post ReplyReply Direct Link To This Post Posted: 30 March 2003 at 2:51pm

for testing purposes i used:

-------------

<html>
<body>
<p>test</P>
<%
dim test
test = Request.ServerVariables("HTTP_Referrer")
response.write(test)
%>
</body>
</html>

------------

but it doesn't work. the page just says test and that's it



Edited by eagle00789
Using forum at Gravenrode and here and here
Back to Top
Bunce View Drop Down
Senior Member
Senior Member
Avatar

Joined: 10 April 2002
Location: Australia
Status: Offline
Points: 846
Post Options Post Options   Thanks (0) Thanks(0)   Quote Bunce Quote  Post ReplyReply Direct Link To This Post Posted: 30 March 2003 at 4:57pm

HTTP_Referrer is not very reliable. It can be blocked by ISP's browsers etc.

There's no reliable way that I know of to get the referrer.

That said, even if it wasn't working, your page shouldn't output 'test' if you are using the code you posted above. It will either show an error, or a blank screen or the referrer.

If it showed 'test' then there's something wrong with your code.

Cheers,
Andrew

There have been many, many posts made throughout the world...
This was one of them.
Back to Top
eagle00789 View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 24 March 2003
Location: Netherlands
Status: Offline
Points: 132
Post Options Post Options   Thanks (0) Thanks(0)   Quote eagle00789 Quote  Post ReplyReply Direct Link To This Post Posted: 30 March 2003 at 10:33pm
there is nothing wrong with my code because of the <p>test</p> directly above the <%...</html> code
Using forum at Gravenrode and here and here
Back to Top
Bunce View Drop Down
Senior Member
Senior Member
Avatar

Joined: 10 April 2002
Location: Australia
Status: Offline
Points: 846
Post Options Post Options   Thanks (0) Thanks(0)   Quote Bunce Quote  Post ReplyReply Direct Link To This Post Posted: 30 March 2003 at 11:07pm

lol, sorry eagle!

I saw the variable name (test) and thought you must have put it in quotes or something.

It isn't coming though then. As I said its not reliable.

Whoops, hang on, try Referer with ONE 'R'. Its a common gotchya.

If that doesn't work then try running one of the script which shows a lit of all the server variables that ARE coming through:
http://www.asp101.com/samples/servvars.asp

Hope this helps,
Andrew

There have been many, many posts made throughout the world...
This was one of them.
Back to Top
eagle00789 View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 24 March 2003
Location: Netherlands
Status: Offline
Points: 132
Post Options Post Options   Thanks (0) Thanks(0)   Quote eagle00789 Quote  Post ReplyReply Direct Link To This Post Posted: 31 March 2003 at 12:18am

well, i tried to use the code below but i doesn't said HTTP_REFERER. Does this mean that i cant use it?? or do i have to install the .net framework on the server (if i install it, do i have to reboot the server??)

------ test.asp ------

<html>
<body>
<p>test</P>
<%
Dim Item
%>
<p><% For Each Item In Request.ServerVariables %></p>
<p><%= Item %>=<%= Request.ServerVariables(Item) %></P>
<% Next %>

</body>
</html>

---------------------------

------ output from the above script ------

test

ALL_HTTP=HTTP_ACCEPT:*/* HTTP_ACCEPT_LANGUAGE:nl HTTP_CONNECTION:keep-alive HTTP_HOST:www.gravenrode.nl HTTP_USER_AGENT:Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; T312461) HTTP_PRAGMA:no-cache HTTP_COOKIE:ForumVisit=LastVist=37705%2C3576273148; FLVST=LTVST=37711%2C3702893518; ASPSESSIONIDGGQQGFMU=LLIFAAICILLHLMENDNCHHJHN HTTP_VIA:HTTP/1.0 inktomi1-cluster[0A016135] (Traffic-Server/5.1.3 [uNcM]) HTTP_CLIENT_IP:217.105.152.77

ALL_RAW=Accept: */* Accept-Language: nl Connection: keep-alive Host: www.gravenrode.nl User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; T312461) Pragma: no-cache Cookie: ForumVisit=LastVist=37705%2C3576273148; FLVST=LTVST=37711%2C3702893518; ASPSESSIONIDGGQQGFMU=LLIFAAICILLHLMENDNCHHJHN Via: HTTP/1.0 inktomi1-cluster[0A016135] (Traffic-Server/5.1.3 [uNcM]) Client-ip: 217.105.152.77

APPL_MD_PATH=/LM/W3SVC/1/ROOT

APPL_PHYSICAL_PATH=c:\inetpub\wwwroot\

AUTH_PASSWORD=

AUTH_TYPE=

AUTH_USER=

CERT_COOKIE=

CERT_FLAGS=

CERT_ISSUER=

CERT_KEYSIZE=

CERT_SECRETKEYSIZE=

CERT_SERIALNUMBER=

CERT_SERVER_ISSUER=

CERT_SERVER_SUBJECT=

CERT_SUBJECT=

CONTENT_LENGTH=0

CONTENT_TYPE=

GATEWAY_INTERFACE=CGI/1.1

HTTPS=off

HTTPS_KEYSIZE=

HTTPS_SECRETKEYSIZE=

HTTPS_SERVER_ISSUER=

HTTPS_SERVER_SUBJECT=

INSTANCE_ID=1

INSTANCE_META_PATH=/LM/W3SVC/1

LOCAL_ADDR=217.105.152.112

LOGON_USER=

PATH_INFO=/test.asp

PATH_TRANSLATED=c:\inetpub\wwwroot\test.asp

QUERY_STRING=

REMOTE_ADDR=212.178.7.53

REMOTE_HOST=212.178.7.53

REMOTE_USER=

REQUEST_METHOD=GET

SCRIPT_NAME=/test.asp

SERVER_NAME=www.gravenrode.nl

SERVER_PORT=80

SERVER_PORT_SECURE=0

SERVER_PROTOCOL=HTTP/1.0

SERVER_SOFTWARE=Microsoft-IIS/5.0

URL=/test.asp

HTTP_ACCEPT=*/*

HTTP_ACCEPT_LANGUAGE=nl

HTTP_CONNECTION=keep-alive

HTTP_HOST=www.gravenrode.nl

HTTP_USER_AGENT=Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; T312461)

HTTP_PRAGMA=no-cache

HTTP_COOKIE=ForumVisit=LastVist=37705%2C3576273148; FLVST=LTVST=37711%2C3702893518; ASPSESSIONIDGGQQGFMU=LLIFAAICILLHLMENDNCHHJHN

HTTP_VIA=HTTP/1.0 inktomi1-cluster[0A016135] (Traffic-Server/5.1.3 [uNcM])

HTTP_CLIENT_IP=217.105.152.77

------ end output ------

Using forum at Gravenrode and here and here
Back to Top
 Post Reply Post Reply Page  12>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.