![]() |
|
#1
|
||||
|
||||
How to get a User's IP address?I am working on a really simple stats / logging script for my network of new sites. I am stuck at the moment trying to get the user's IP for my statistics db table and reporting.
There are quite a few possible 'variables' containing this information and this is a list I compiled so far by searching for this info over the last few days: PHP Code:
Do you know of any others for this list? Or how many of those on this list are even still valid? Besides the variable $_SERVER['REMOTE_ADDR'], which is nearly always set, why and when are the others available to a script? __________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
|
#2
|
||||
|
||||
|
Nope... But my friend JdS might know.
Doh! __________________
Mr. Bob's Web Design - Tirelessly looking for ways to enhance the customer base of your business. |
|
#3
|
|||
|
|||
|
What about
PHP Code:
or have I misunderstood the question? Which wouldnt be unusual ![]() Sorry just read the question again and of course in my rush ignored the IP bit and made a stupid suggestion :0 |
|
#4
|
||||
|
||||
|
Warning: really off-topic!
Bobby, Today my horoscope said: Be open to absorbing some new ideas or information today, J. If you keep your eyes and ears open, you might come across something that you have been seeking...... Even a good friend might accidentally mention something pertinent. So put out that radar and soak up interesting waves! So either you're not a good friend or my radar needs an upgrade! Misunderstood, Thank you for trying to help me, I appreciate it even if the information is not what I was hoping for. __________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
|
#5
|
||||
|
||||
|
why are you trying the others if one of them works all the time?
__________________
Mr. Bob's Web Design - Tirelessly looking for ways to enhance the customer base of your business. |
|
#6
|
||||
|
||||
|
proxy servers
__________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
|
#7
|
||||
|
||||
|
Well the thing is, each of them have some utility in some situation. Setup some if statements to weed them out if they are not set.
__________________
Mr. Bob's Web Design - Tirelessly looking for ways to enhance the customer base of your business. |
|
#8
|
|||
|
|||
|
Sorry for the late response, but I just stumbled upon this thread. Anyway... if you are still interested, here is a function I wrote for another project which may help.
PHP Code:
|
|
#9
|
||||
|
||||
|
Thank you for sharing that CS2... unfortunately all my work of the last few months is potentially lost so I have no way to test your little script at the moment.
Once I am able to retrieve my 'lost' files or re-write everything again, I will refer to this thread when I handle the issue. __________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
Recent GIDBlog
NARMY by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| tracking city and country from IP address | s786787 | Web Design Forum | 5 | 06-Nov-2003 23:23 |
| Rebase - Must Get! | BobbyDouglas | Miscellaneous Programming Forum | 0 | 18-Aug-2003 04:57 |
| any one knows about the address of the deleted files in FAT | shaam | CPP / C++ Forum | 1 | 09-Aug-2003 16:18 |
| E-mail address cloaker | jrobbio | MySQL / PHP Forum | 0 | 16-May-2003 11:23 |
| Slight increase in Netscape users? | JdS | Web Design Forum | 10 | 01-Sep-2002 11:59 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The