Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - PHP code
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

PHP code

 Post Reply Post Reply Page  12>
Author
zMaestro View Drop Down
Senior Member
Senior Member


Joined: 11 May 2003
Location: Egypt
Status: Offline
Points: 1183
Post Options Post Options   Thanks (0) Thanks(0)   Quote zMaestro Quote  Post ReplyReply Direct Link To This Post Topic: PHP code
    Posted: 08 October 2003 at 2:43am

I know NOTHING in php...

I want a code that is equivelent to this pleez:

Response.Write (Request.servervariables("http_host"))

Back to Top
Gullanian View Drop Down
Senior Member
Senior Member
Avatar

Joined: 04 January 2002
Location: England
Status: Offline
Points: 4373
Post Options Post Options   Thanks (0) Thanks(0)   Quote Gullanian Quote  Post ReplyReply Direct Link To This Post Posted: 08 October 2003 at 6:55am

Try:

$_SERVER['HTTP_REFERRER']

Back to Top
KCWebMonkey View Drop Down
Senior Member
Senior Member
Avatar
Go Chiefs!

Joined: 21 June 2002
Status: Offline
Points: 1319
Post Options Post Options   Thanks (0) Thanks(0)   Quote KCWebMonkey Quote  Post ReplyReply Direct Link To This Post Posted: 08 October 2003 at 7:01am

<?php echo $_HTTP_SERVER_VARS["HTTP_HOST"]; ?>

also,

using this will spit out all the predefined variables: <?php phpinfo(); ?>

Back to Top
zMaestro View Drop Down
Senior Member
Senior Member


Joined: 11 May 2003
Location: Egypt
Status: Offline
Points: 1183
Post Options Post Options   Thanks (0) Thanks(0)   Quote zMaestro Quote  Post ReplyReply Direct Link To This Post Posted: 21 October 2003 at 8:51am

Originally posted by zMaestro zMaestro wrote:

I know NOTHING in php...

i wrote: <h1>$_SERVER['HTTP_REFERRER']</h1>

and it wrote: ........................................................

have a look plz:

http://www.it-egypt.com/default.php

Back to Top
zMaestro View Drop Down
Senior Member
Senior Member


Joined: 11 May 2003
Location: Egypt
Status: Offline
Points: 1183
Post Options Post Options   Thanks (0) Thanks(0)   Quote zMaestro Quote  Post ReplyReply Direct Link To This Post Posted: 21 October 2003 at 8:58am

neither this worked:

<h1><?php $_SERVER['HTTP_REFERRER']?></h1>

Back to Top
KCWebMonkey View Drop Down
Senior Member
Senior Member
Avatar
Go Chiefs!

Joined: 21 June 2002
Status: Offline
Points: 1319
Post Options Post Options   Thanks (0) Thanks(0)   Quote KCWebMonkey Quote  Post ReplyReply Direct Link To This Post Posted: 21 October 2003 at 9:10am

It won't work unless there IS a referrer...

<edit> you have to come to that page from a link on another page, and then the referrer will have a value. </edit>



Edited by KCWebMonkey
Back to Top
zMaestro View Drop Down
Senior Member
Senior Member


Joined: 11 May 2003
Location: Egypt
Status: Offline
Points: 1183
Post Options Post Options   Thanks (0) Thanks(0)   Quote zMaestro Quote  Post ReplyReply Direct Link To This Post Posted: 21 October 2003 at 9:20am

Response.Write (Request.servervariables("http_host")) doesn't need a Refferer..

 

I'm trying now...

Back to Top
KCWebMonkey View Drop Down
Senior Member
Senior Member
Avatar
Go Chiefs!

Joined: 21 June 2002
Status: Offline
Points: 1319
Post Options Post Options   Thanks (0) Thanks(0)   Quote KCWebMonkey Quote  Post ReplyReply Direct Link To This Post Posted: 21 October 2003 at 9:39am
Originally posted by zMaestro zMaestro wrote:

Response.Write (Request.servervariables("http_host")) doesn't need a Refferer..

referrer means "referring page". there must be a referring page if you want that server variable to have a value...



Edited by KCWebMonkey
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.