Sponsored by NuSphere - PHP Software for PHP Application Developers - On Sale This Week for $100



Go Back   PHP-Editors > Programming Help > PHP Programming Help

PHP Programming Help Post any question relating to PHP Programming here and hopefully someone can help.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 2003-06-25, 04:03 PM
G_UNS
Guest
 
Posts: n/a
Default

I am having trouble getting some of the environment variables to work.

I have never used them before so I am not sure if some of them have become outdated with the current php platform.

I made a page of the variables and printed them all out to see which ones worked: Environment Variables

The one I am mainly interested in is the $HTTP_REFERER for a script I am trying to write so that people cannot hotlink my websites content.

Would this have something to do with my host server running Windows instead of Linux?

__________________________________________________ _-

Thanks for the help,

-Grant
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 2003-06-25, 04:30 PM
stuart's Avatar
Administrator
 
Join Date: Jan 2003
Location: Scotland
Posts: 472
stuart will become famous soon enoughstuart will become famous soon enough
Send a message via MSN to stuart
Default

the best way to see your environment settings is to use a simple function.

Code:
<?
phpinfo();
?>
add the above into a file and execute it on your server.
You will get a list of all your env settings and should get the answer to your question there.
Reply With Quote
  #3 (permalink)  
Old 2003-06-25, 07:01 PM
G_UNS
Guest
 
Posts: n/a
Default

Thanks for the help man,

-Grant
Reply With Quote
  #4 (permalink)  
Old 2003-06-25, 07:20 PM
G_UNS
Guest
 
Posts: n/a
Default

Ok, i tried your suggestion, but they made no comment on any HTTP_REFERER.

On thing that was mention is: "session.referer_check" which had no value. Does this have anything to do with it?

__________________________________

Thanks,

-Grant
Reply With Quote
  #5 (permalink)  
Old 2003-06-25, 08:41 PM
Junior Member
 
Join Date: Jun 2003
Location: .us
Posts: 15
Brand
Send a message via ICQ to Brand Send a message via AIM to Brand
Default

isnt that a super global var?

I think that it's $_SERVER['HTTP_REFERER'] ... dont hold me to that
__________________
Contheory.com
Reply With Quote
  #6 (permalink)  
Old 2003-06-25, 09:22 PM
Junior Member
 
Join Date: May 2003
Location: Boulder, CO
Posts: 14
Mr. Sketch
Default

It might also be under $HTTP_SERVER_VARS['HTTP_REFERER']
Reply With Quote
  #7 (permalink)  
Old 2003-06-26, 02:01 AM
Junior Member
 
Join Date: Jun 2003
Location: .us
Posts: 15
Brand
Send a message via ICQ to Brand Send a message via AIM to Brand
Default

i thought all super globals started with $_ though.. who knows
__________________
Contheory.com
Reply With Quote
  #8 (permalink)  
Old 2003-06-26, 07:34 PM
G_UNS
Guest
 
Posts: n/a
Default

You nailed it... $_SERVER['HTTP_REFERRER']

thanks,

-Grant
Reply With Quote
Must read Review for Serious PHP Developers


NuSphere PhpED 5.0 : The Staff of php-editors.com recently spent a few days working with NuSphere PhpED 5.0 (a popular PHP IDE) and NuCoder 1.4 (a PHP Encoding Utility), read up on all the details.

Sponsored Links
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 09:24 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0
© Copyright 2003-2008 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.