Hello,
I'm trying to modify my page to show visitor's IP Address ...
GeoHostIP plugin isn't O.K. for me ... is there an alternative / trick
what to input in a website so I can retrieve the IP and style it in CSS?
Visitor's IP Address ?? [SOLVED]
Visitor's IP Address ?? [SOLVED]
Last edited by pamelina on Sun Jan 25, 2009 9:33 pm, edited 1 time in total.
Re: Visitor's IP Address ??
The module Statistics has the parameter....
Ronnyvisitorip : show the IP of the current visitor
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
Re: Visitor's IP Address ??
{$smarty.server.REMOTE_ADDR} ?? or something like that.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: Visitor's IP Address ??
can confirm that:
{capture name=some_content assign=popText}
The server is {$smarty.server.SERVER_NAME|upper} at {$smarty.server.SERVER_ADDR}
Your ip is {$smarty.server.REMOTE_ADDR}.
{/capture}
help
http://www.smarty.net/manual/en/languag ... ctions.php at the bottom
{capture name=some_content assign=popText}
The server is {$smarty.server.SERVER_NAME|upper} at {$smarty.server.SERVER_ADDR}
Your ip is {$smarty.server.REMOTE_ADDR}.
{/capture}
help
http://www.smarty.net/manual/en/languag ... ctions.php at the bottom
Re: Visitor's IP Address ??
I have inserted both:
{Statistics visitorip} as stated in module help
and
{$smarty.server.REMOTE_ADDR}
No ... go, it's not working ....
I wish to put Visitor's Ip address to front page so visitor can see his/hers IP.
{Statistics visitorip} as stated in module help
and
{$smarty.server.REMOTE_ADDR}
No ... go, it's not working ....
I wish to put Visitor's Ip address to front page so visitor can see his/hers IP.
Re: Visitor's IP Address ??
more details please! where did you put it? if you put it in the template, it works for example
Re: Visitor's IP Address ??
I have a little code snippet that might help (actually not my own code, taken from the geo_ip module - so credits belong to respective author):
Best
Nils
Code: Select all
function get_ip() {
if (isset($_SERVER['HTTP_CLIENT_IP'])) {
$ip = stripslashes($_SERVER['HTTP_CLIENT_IP']);
} else {
if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
$ip = stripslashes($_SERVER['HTTP_X_FORWARDED_FOR']);
} else {
$ip = stripslashes($_SERVER['REMOTE_ADDR']);
}
}
return $ip;
}
Nils
Re: Visitor's IP Address ??
To all of you BIG Thanks for pointing me to the right direction ....
Special thanks to Simon Schaufi, I solved the problem, did exactly what link stated ...
Pamelina
Special thanks to Simon Schaufi, I solved the problem, did exactly what link stated ...
Pamelina