|
|
|
||||
|
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() |
|
|||||||
| Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
|
Thread Tools |
|
|
#1 |
|
Confirmed User
Join Date: Oct 2002
Posts: 6,780
|
simple php help..
i have a mortgage form that posts submitted data to mysql.. however, somehow when users post in my mysql dbase it shows their ip as my server ip..
im using $_SERVER['REMOTE_ADDR'] but it still shows my server ip for every submission.. What do you suggest (btw this is shared hosting)
__________________
_________________ I am the best
|
|
|
|
|
|
#2 | |
|
Confirmed User
Industry Role:
Join Date: Jul 2007
Location: Intraweb
Posts: 274
|
Quote:
|
|
|
|
|
|
|
#3 |
|
Confirmed User
Join Date: Oct 2002
Posts: 6,780
|
what do u mean im doing post from my server? when i upload any simple php script and do server[remote_addr] , and echo it, it gives me server ip..
__________________
_________________ I am the best
|
|
|
|
|
|
#4 |
|
Confirmed User
Join Date: Jun 2006
Posts: 530
|
your host is probably using some sort of caching/proxy server in front of the main web server. run get_defined_vars to see if the real IP is set elsewhere
|
|
|
|
|
|
#5 | |
|
Confirmed User
Join Date: Feb 2005
Location: SD/OC/LA
Posts: 1,917
|
Quote:
the advice that was given will sort you out. something like Code:
<input name="remoteip" type="hidden" value="<?php print $REMOTE_ADDR; ?>">
__________________
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Warriors come out to plaAAaayyy! ![]() =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= |
|
|
|
|
|
|
#6 |
|
Confirmed User
Industry Role:
Join Date: Jul 2007
Location: Intraweb
Posts: 274
|
Yeah, my advise was just my first take on the matter, i thought maybe you had a php script doing the actual posting to your processing code, if not i'd check out this solution.
|
|
|
|
|
|
#7 | |
|
Confirmed User
Join Date: Jun 2006
Posts: 530
|
Quote:
and why are you using code that depends on register globals being on? |
|
|
|
|
|
|
#8 |
|
Confirmed User
Join Date: Oct 2002
Posts: 6,780
|
i tried to call it by adding this to my main php index page that has the form..
<input type="hidden" name="ip" value="$_SERVER[REMOTE_ADDR]"> and it doesnt work. Just shows the same stuff when i view source. i wanna get that variable and pass it on.. but it just shows me $SERVER[REMOTE_ADDR]"> and not actual ip..
__________________
_________________ I am the best
|
|
|
|
|
|
#9 |
|
Confirmed User
Join Date: Oct 2002
Posts: 6,780
|
added <input name="remoteip" type="hidden" value="<?php print $REMOTE_ADDR; ?>"> to my code..
when i open page and view source, comes up blank.. nothing there
__________________
_________________ I am the best
|
|
|
|
|
|
#10 |
|
Confirmed User
Join Date: Oct 2002
Posts: 6,780
|
ok i tried <input name="remoteip" type="hidden" value="<?php print $REMOTE_ADDR; ?>"> and when i view source i still see server ip?
__________________
_________________ I am the best
|
|
|
|
|
|
#11 |
|
Confirmed User
Industry Role:
Join Date: Nov 2005
Posts: 639
|
Check out your phpinfo()
That's going to show you all the variables. If you're getting the wrong value you can see what you want from the phpinfo and change your script. |
|
|
|
|
|
#12 |
|
Confirmed User
Join Date: Oct 2002
Posts: 6,780
|
maybe ill host a lil svcript to grab ip on a diff server and then include it on this one.. will this work? if so how?
__________________
_________________ I am the best
|
|
|
|
|
|
#13 |
|
Confirmed User
Join Date: Oct 2002
Posts: 6,780
|
i looked but it shows remote_addr as server ip still.. come on guys what can i do
__________________
_________________ I am the best
|
|
|
|
|
|
#14 |
|
Confirmed User
Join Date: Oct 2002
Posts: 6,780
|
bumppppppppp
__________________
_________________ I am the best
|
|
|
|
|
|
#15 |
|
Confirmed User
Join Date: Oct 2002
Posts: 6,780
|
bump again
__________________
_________________ I am the best
|
|
|
|
|
|
#16 |
|
Confirmed User
Join Date: Nov 2004
Location: scv
Posts: 2,299
|
Ask your host...
|
|
|
|
|
|
#17 |
|
Confirmed User
Join Date: Jan 2007
Posts: 190
|
if a proxy is a problem use dmxzone.com/ShowDetail.asp?NewsId=8100
or use $_ENV["REMOTE_ADDR"] (environment IP) if none of these show the user IP, try on another PC, your ISP might be reporting back incorrect IP's. |
|
|
|
|
|
#18 |
|
Confirmed User
Join Date: May 2004
Posts: 886
|
If you can test from a known IP, what I would do is generate a dump of the environment variables and see where your IP shows up. Then use that instead of the remote host (which isnt recommended but might works).
The best solution (like others have said) would be to contact the ISP to see why your IP is coming back. Probably some routing issue on the box itself. |
|
|
|