Quick Question - Ip Adress

This is a discussion on "Quick Question - Ip Adress" within the PHP Forum section. This forum, and the thread "Quick Question - Ip Adress are both part of the Program Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > PHP Forum

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Aug 15th, 2006, 21:05
Up'n'Coming Member
Join Date: Jun 2006
Location: Rochester, NY
Posts: 67
Thanks: 0
Thanked 0 Times in 0 Posts
Quick Question - Ip Adress

Is There any quick code to find the client/users IP Adress, i need it for a hit counter.
I recall coming across one in the past in a book for php but i dont have that resource anymore.

thanks, Comp
__________________
www.MonsterCoding.com - Website Programming and Development Services
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Aug 15th, 2006, 21:26
New Member
Join Date: Aug 2006
Location: UK
Age: 21
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Quick Question - Ip Adress

You can use $REMOTE_ADDR. example:
Code: Select all
$ip = $REMOTE_ADDR;
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Aug 15th, 2006, 22:12
Up'n'Coming Member
Join Date: Jun 2006
Location: Rochester, NY
Posts: 67
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Quick Question - Ip Adress

That didnt work initially so i figured i needed a stricter version of that code, so i searched it on php.net, found
$_SERVER['REMOTE_ADDR'];
and used that instead for it to work.
thanks
__________________
www.MonsterCoding.com - Website Programming and Development Services
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Aug 15th, 2006, 22:40
New Member
Join Date: Aug 2006
Location: UK
Age: 21
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Quick Question - Ip Adress

Weird, works fine for me.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
quick, question, adress

Thread Tools

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
quick question capluvshll Starting Out 5 May 2nd, 2007 19:13
Quick question extrememonkey Website Planning 0 Mar 27th, 2007 17:56
Quick Question SolitarySoul Website Planning 4 Mar 12th, 2007 15:45
Quick question Accurax Web Page Design 5 Nov 1st, 2006 17:44


All times are GMT. The time now is 08:21.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42