hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Programming Discussion : $_server['http_referer']
Reply

Forum Jump

$_server['http_referer']

Reply Post New Thread In Programming Discussion Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 03-23-2004, 03:23 AM
Wojtek Wojtek is offline
Aspiring Evangelist
 
Join Date: Sep 2003
Location: Montreal, Canada
Posts: 373

$_server['http_referer']


How can I make a certain part of text hidden if someone came from a specific domain?

$_SERVER['HTTP_REFERER'] would only be good to tell if user came from a specific page, what about server-wide?

Ex: all people who came from any page from domain123.com don't see the latest news.

Thanks

Reply With Quote


Sponsored Links
  #2  
Old 03-23-2004, 05:22 AM
orbitz orbitz is offline
Web Hosting Master
 
Join Date: Mar 2004
Posts: 1,301
you use this:

if ($_SERVER['HTTP_HOST'] == "www.domain123.com"){
//
}


Last edited by orbitz; 03-23-2004 at 05:25 AM.
Reply With Quote
  #3  
Old 03-23-2004, 05:51 AM
Rich2k Rich2k is offline
Web Hosting Master
 
Join Date: May 2002
Location: UK
Posts: 2,994
$_SERVER['HTTP_HOST'] is the current server not a referring domain.

You can use HTTP_REFERER but unfortunately it is very easily bypassed, and in fact most personal firewalls disable this information automatically.

Reply With Quote
Sponsored Links
  #4  
Old 03-23-2004, 06:11 AM
orbitz orbitz is offline
Web Hosting Master
 
Join Date: Mar 2004
Posts: 1,301
yeah, sorry, I had already gone to sleep and realized that it was for the current host, I had to get back here but it is too late to edit my post ...bed time again!

Reply With Quote
  #5  
Old 03-23-2004, 06:14 AM
orbitz orbitz is offline
Web Hosting Master
 
Join Date: Mar 2004
Posts: 1,301
Quote:
Originally posted by Rich2k
$_SERVER['HTTP_HOST'] is the current server not a referring domain.

You can use HTTP_REFERER but unfortunately it is very easily bypassed, and in fact most personal firewalls disable this information automatically.

ohh, so if I happen to use HTTP_REFERER and users block this info, my script won't work? what if the HTTP_REFERER comes within my domain?

Reply With Quote
  #6  
Old 03-23-2004, 06:18 AM
orbitz orbitz is offline
Web Hosting Master
 
Join Date: Mar 2004
Posts: 1,301
nice website Wojtek

Reply With Quote
  #7  
Old 03-23-2004, 05:16 PM
hiryuu hiryuu is offline
Web Hosting Master
 
Join Date: Jan 2003
Posts: 1,715
That's the problem with any client-supplied data -- you can't depend on it and you should treat anything they provide like a live grenade.

So you can use HTTP_REFERER, but make provisions so your site still works if it's invalid or not provided.

__________________
Game Servers are the next hot market!
Slim margins, heavy support, fickle customers, and moronic suppliers!
Start your own today!

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted
Dropbox Vulnerability Allows Unauthorized Access of User Files Web Hosting News 2014-05-07 14:31:27
Server Mania Listing 2014-07-28 18:25:41
Total Server Solutions Buys Its Second Web Host in Three Months: Hands-On Web Hosting Web Hosting News 2014-01-09 11:29:23
Web Host 1&1 Internet Adds Server Restoration Tool for Virtual Machines Web Hosting News 2012-11-07 15:45:16
Web Host OrcsWeb Offers Support for Windows Server 2012 Web Hosting News 2012-08-24 11:08:35


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

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 Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?