It is currently Thu Mar 28, 2024 10:03 am


All times are UTC


Forum rules


Please click here to view the forum rules



Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: PHP referrer
PostPosted: Thu Sep 22, 2005 2:56 pm 
Noobie
Noobie

Joined: Thu Sep 22, 2005 2:45 pm
Posts: 1
Hey guys, i have a php script that rotates images when you refresh the page. What i want to do now is add something to it so that when i'm in a specific part of a forum it will select images from a different folder. So far I have:

$ref = $_SERVER['HTTP_REFERER'];



if ($ref = $_SERVER['HTTP_REFERER'] == 'http://www.nxsecure.org/forums/index.php?showforum=166') {

$folder = ('/home/www/site/batcave');

} else {

$folder = ('/home/www/site/sigs');



Now it must be doing something because it takes the images from the correct folder, sigs. The problem is when i'm in the batcave, forum id 166, it still takes the images from the sigs folder and not the batcave folder. I've tried changing it to a specific post and it still won't work.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 26, 2005 5:53 pm 
Posts like crazy!
Posts like crazy!

Joined: Mon Sep 26, 2005 5:03 pm
Posts: 204
Location: The Netherlands
as said on php.net:
Quote:
'HTTP_REFERER'

The address of the page (if any) which referred the user agent to the current page. This is set by the user agent. Not all user agents will set this, and some provide the ability to modify HTTP_REFERER as a feature. In short, it cannot really be trusted.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ]  Moderators: fhmagic, KJ, Moderators, Support Team

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
100WebSpace © 2011