IP addy of people who post comms on blogs

HMSSHM

New Member
Hey all,
I was wondering if we could see the IP address of a person who's posted a comment on our blog?
My visitors, who are people I know, usually put their real name, but when it comes to posting something rather offensive they put in "anonymous".
So I'd like to identify those people.
Can anyone help?
 
If I was on a forum and my IP was made public I'd leave that forum so fast it would make your head spin. I value my internet privacy... but then again, I don't make offensive posts!
Tom
 
I agree with OvenMaster. However, I think that if an ip address could be seen, then it should only be seen by moderators or the admin of the board, thats it, which is true with someboard. Not just various members seeing it. I was a member of a board that was realted to bodybuilding/fitness and you could see other's IP addresses under their Location area/above their post numbers. That board was a nightmare, cause of stalking issues. Half of the people on the board were actually subpoenaed because of two members who had an argument and went from the forum and spilled over into a stalking case that turned into an aggrivated battery case. Needless to say, the board was shut down temporarly and then reopened under a new name/ownership. it's just a BAD idea to know others IP address IMO.
 
ok, im not sure how your blog works, if its mainstream or not, or if its custom coded, if its custom this should be easy, To make it simple, i hope your using PHP.

this would be how to display a users IP when they are actively viewing a page

PHP:
$ip = $_SERVER['REMOTE_ADDR'];
That integrates the value into the variable named "ip". Now im fairly sure you can save this variable, whether it be to a separate php file or SQL database, wherever your posts are going. Once the value of the variable has been saved or "captured" if you like and stored somewhere, your script to display posts can then be altered to include the displaying of the new variable, the one with the IP address in it.

Obviously if your not running in PHP then were back to square one, also if your on a commercial board or shop bought software, it might be quite hard.

dragon
 
What is your blog running, is it wordpress, which is common, if so you are able to see the IP address of the poster in the comments section.
If not, as dragon said you can modify it log the IP, using:
PHP:
$ip = $_SERVER['REMOTE_ADDR'];
echo $ip;

would display the users IP address, you can then integrate that into the blog so that whenever a user posts a comment, it records their IP address, an example would be:
PHP:
$ip = $_SERVER['REMOTE_ADDR'];
//SQL QUERY
mysql_query("INSERY INTO `blog_table` VALUES(NULL,'whatever','fdsfds,'$ip')");
$ip would represent the IP address, you would not be able to use that code directly as it would need to be customised for your database.

If you are using wordpress and it is spam which you are getting, i would reccomend installing the akismet ant spam mod, itis free and very effective at stopping spam.

Lee
 
Back
Top