Welcome, guest!  |   Login  |  
Close

Login to Your Account


  |  » Forgot your password?
Join

Notices

Thread: Help wanted please

 
Tools Search
  #1  
Old July 5th, 2004, 08:14 AM
pph Expert!
Join Date: January 18th, 2005
Location: Edmonton Canada
Posts: 5,791
Send a message via AIM to Gordon
Can anyone tell me why the "referrer" and "user_browser" will not work? The other 3 work just fine but no matter how I've written the referrer and user_browser they won't work.

$getdate = date( "Y-m-d" );// Get the date for the database.
$gettime = date( "h:i:s A" );// Get the time.
$user_ip = $_SERVER['REMOTE_ADDR'];// Get the users IP.
$user_browser = $_SERVER['HTTP_USER_AGENT'];// Get the browser type.
$referrer = $_SERVER['HTTP_REFERER'];// Get the refering page.
__________________
One day parasites and their ilk will be made illegal, I bet a few Lawyers will be pissed off when the day comes.
Mr. Spitzer is fetching it nearer

YouTrek
  #2  
Old July 5th, 2004, 12:01 PM
Full Member
Join Date: January 17th, 2005
Posts: 70
Are those 3 returning anything at all ?

<edit>FYI you should also look up http_x_forwarded_for </edit>

Breezing
  #3  
Old July 5th, 2004, 12:14 PM
pph Expert!
Join Date: January 18th, 2005
Location: Edmonton Canada
Posts: 5,791
Send a message via AIM to Gordon
I thought the IP one was working but it is not so no none of the bottom three will give me any results at all. I do not understand your edit could you explain a little please?

thanks
__________________
One day parasites and their ilk will be made illegal, I bet a few Lawyers will be pissed off when the day comes.
Mr. Spitzer is fetching it nearer

YouTrek
Join ABW to remove this sponsored message.
  #4  
Old July 5th, 2004, 12:58 PM
Full Member
Join Date: January 17th, 2005
Posts: 70
That's odd, anyway...

Create a page with just:

<?php
phpinfo();
echo($_SERVER['REMOTE_ADDR']);
?>

and see if that page returns the values you want.

About the edit...

$user_ip = $_SERVER['REMOTE_ADDR'];// Get the users IP.
there's remote_addr and there's http_x_forwarded_for.

For example, I am required by my ISP to use a proxy server (so in this case remote_addr will return the proxy's server IP address ). If I would browse your website I would also send you a variable called http_x_forwarded_for which is my real IP address and not the proxy's.

So I'm not sure what you are using this script for but you might want to check both.

Mind you, this isn't bulletproof even when using both remote_addr and http_x_forwarded_for.


Hope that made sence,
Breezing
  #5  
Old July 11th, 2004, 09:11 PM
ABW Ambassador
Join Date: January 18th, 2005
Posts: 1,015
from php.net:
<BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>'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. <HR></BLOCKQUOTE>

Ditto user agent. Opera isn't the only one that can fudge its string, ya know..
__________________
“An adventure is an inconvenience rightly considered. An inconvenience is an adventure wrongly considered.” - G.K. Chesterton
Reply

Tools Search
Search:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Thinking of Getting Rid of LinkShare - Opinions are Wanted... Wayne at DriveWerks Rakuten LinkShare 131 November 10th, 2004 12:12 AM
Wanted: Honest, Mature, Goal oriented Musical Website with affiliate program. AffJus ShareASale 0 September 22nd, 2002 03:29 PM
Wanted: Honest, Mature, Goal oriented Music Website with affiliate program AffJus Rakuten LinkShare 0 September 22nd, 2002 03:24 PM
Merchants Wanted Forum eaglefire Midnight Cafe' 0 July 13th, 2002 08:31 AM

X

Welcome to ABestWeb.com

Create your username to jump into the discussion!

ABestWeb.com is the largest affiliate marketing community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?



Content Relevant URLs by vBSEO ©2011, Crawlability, Inc.