473,385 Members | 1,396 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Users IP on PHP3?


I have a project and PHP 3.0.12 is installed...rediculous I know, but its
not my fault.

what is the syntax for getting the visiting users IP? Nothing I try seems to
work.

Thanks in Advance,
Karl
Jul 17 '05 #1
6 1803
* "Karl Hungus" <nn*********@hotmail.com> wrote:
I have a project and PHP 3.0.12 is installed...rediculous I know, but its
not my fault.

what is the syntax for getting the visiting users IP? Nothing I try seems to
work.

It is availeable in
$_SERVER[REMOTE_HOST]
martin

--
Are you Anonymous? Where? ... I don't think so ...

[ devnull{at}chaosfactory{dot}org | http://www.chaosfactory.org/ ]
Jul 17 '05 #2
Karl Hungus wrote:
I have a project and PHP 3.0.12 is installed...rediculous I know, but its
not my fault.

what is the syntax for getting the visiting users IP? Nothing I try seems to
work.


Try
$_SERVER['REMOTE_ADDR']

But, that can be the IP address of the proxy they use.

If I were to go to your page you'd get the same address as anybody else
coming from the same city and provider I'm in -- the address of our
provider &^##$^% http-proxy!
--
--= my mail box only accepts =--
--= Content-Type: text/plain =--
--= Size below 10001 bytes =--
Jul 17 '05 #3

$_SERVER will not work on php3 at all.

"Note: Introduced in 4.1.0. In earlier versions, use $HTTP_SERVER_VARS"

http_server_vars doesnt work either

Try
$_SERVER['REMOTE_ADDR']

But, that can be the IP address of the proxy they use.

If I were to go to your page you'd get the same address as anybody else
coming from the same city and provider I'm in -- the address of our
provider &^##$^% http-proxy!
--
--= my mail box only accepts =--
--= Content-Type: text/plain =--
--= Size below 10001 bytes =--

Jul 17 '05 #4
On Wed, 25 Feb 2004 23:26:41 +0100, Martin Buchleitner
<de*****@chaosfactory.org> wrote:
* "Karl Hungus" <nn*********@hotmail.com> wrote:
I have a project and PHP 3.0.12 is installed...rediculous I know, but its
not my fault.

what is the syntax for getting the visiting users IP? Nothing I try seems to
work.


It is availeable in
$_SERVER[REMOTE_HOST]


No it isn't.

--
Andy Hassall <an**@andyh.co.uk> / Space: disk usage analysis tool
<http://www.andyh.co.uk> / <http://www.andyhsoftware.co.uk/space>
Jul 17 '05 #5
On Wed, 25 Feb 2004 22:23:47 GMT, "Karl Hungus" <nn*********@hotmail.com>
wrote:
I have a project and PHP 3.0.12 is installed...rediculous I know, but its
not my fault.

what is the syntax for getting the visiting users IP? Nothing I try seems to
work.


Hm, even 'get_defined_vars' doesn't work way back in PHP3.

Is there anything in the output of phpinfo() you could work with? Is
$REMOTE_ADDR set as a global variable?

--
Andy Hassall <an**@andyh.co.uk> / Space: disk usage analysis tool
<http://www.andyh.co.uk> / <http://www.andyhsoftware.co.uk/space>
Jul 17 '05 #6

Yeah, I can use the global variables. thanks.
Is there anything in the output of phpinfo() you could work with? Is
$REMOTE_ADDR set as a global variable?

--
Andy Hassall <an**@andyh.co.uk> / Space: disk usage analysis tool
<http://www.andyh.co.uk> / <http://www.andyhsoftware.co.uk/space>

Jul 17 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: R. Rajesh Jeba Anbiah | last post by:
Someone has already pointed out that Google uses PHP <http://groups.google.com/groups?selm=aj3flv%24dqg%241%40venus.btinternet.com> Just I came across a PHP3 page at Google...
1
by: Ravi & Paami | last post by:
After I tried upgrading my php version from 3 to 4, all my code which passes parameters between web pages have stopped working. Not sure what the problem is. Have tried defining the parameters in...
2
by: pancho | last post by:
Greetings, I need help configuring/building PHP3 with MySQL as a DSO on a Solaris 8 box - this module is needed to host some existing sites I will be migrating Note. I built PHP4 from source and...
0
by: Saurabh | last post by:
Hi all, I am using php3. For uploading a file i put <input type=file name=thesisfile> in the html file. now in the php3 file that i am using i used echo $thesisfile_type; echo...
2
by: me.linuxadmin | last post by:
hi all ive got php-4.3.9-3 on my fedora3....tried installing phptimesheet-1.2.4.tar.gz on my system..extracted the folder to document root of apache2..all the files of the timesheet have php3...
2
by: gavino | last post by:
REHDAT LINUX 4S PHP 4.3.9 LEGACY APP I MOVED NOW EATS MEMORY CAN ANYONE TAE A LOOK ? I FIXED ONE PARTIALLY BY CHANGING TO here are my apache settings: 1 page laoding for a few seconds eat like...
1
by: gavino | last post by:
if you can tell me why this php3 app is failing on php 4,3,9 (21:13:31) gavinhopeful: can someone take a peek at this code? http://hashphp.org/pastebin.php?format=plain&pid=8178 (21:13:42)...
2
tolkienarda
by: tolkienarda | last post by:
hi all can someone enlighten me as to the difference between .php and .php3 i have a script that was written with the intent of being saved as .php3 currently i have it running online as a .php...
6
by: gvijayasurya | last post by:
Difference between the PHP3 and PHP4 and PHP5
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.