This blog has moved here: Yogeshsaroya.com | FOLLOW ME ON TWITTER @yogeshsaroya

Monday, October 3, 2011

How To Get Friends IP Address

Hello Friends 


        Here I tell You about how to know your friends (when she/he is online or chatting with you) IP address.
We dont use any backdoor . follow  a simple steps  .
1. Find PHP free hosting web site . like ( x10hosting.com).
2. Create Free Hosting Account .
3. chose something interesting name of domain like . love-wallpapers.x10.com.
4. Copy and paste this code in Notpad and Save it as index.php .

Code:



<?php
$f_id=$_SERVER['REMOTE_ADDR'];
$to = "Your_email_id@example.com";
$subject = "Frnd IP Address";
$message =$f_id;
$from = "myfriends@example.com";
$headers = "From:" . $from;
mail($to,$subject,$message,$headers);
echo "<script>
window.location = 'http://www.google.co.in/';
</script>";
?>


Save and upload this index page on your free web hosting server.



5. If your friends is online the send him.her your free web site link  (Eg. love-wallpapers.x10.com).
when she/he open it this code mail you his/her IP address on your email address (in code : Your_email)id@example.com ) and he redirect to Google.com.

But this or many free web hosting doesn't allow SMPT server .. you dont get any Email ..

For this problem I  give you another code .

1. create a database on websever .
   use this script 

For database :

create DATABASE `mydata`;
use mydata;
CREATE TABLE  `ip` (
 `f_ip` VARCHAR( 200 ) NOT NULL
);


2. Save this code as index.php (use notpad) 

< ?php 
$conn=mysql_connect("localhost","Databse_user_name ","Your_password") or die ("oops something wrong ");
mysql_select_db("mydata", $conn);
mysql_query("insert into ip values('$f_id')");
echo "<script>
window.location = 'http://www.google.co.in/';
</script>";
?>

Note: Databse_user_name= database User name .
Your_password= Password of databas user .
mydata = Database name .


3. Copy,paste and save this code with name get ip.php


Code:


<table><?php

$conn=mysql_connect("localhost","Databse_user_name ","Your_password") or die ("oops something wrong ");
mysql_select_db("mydata", $conn);

$que=mysql_query("select *from ip");
while($list_of_ip=mysql_fetch_array($que))
{
echo "<tr><td>$list_of_ip[0]</td></tr>";
}?></table>


4. Now upload both page on your free web server . 


5. for testing open yor free web (eb. love-wallpapers.x10.com). this page redirect on google.com and doesn't show any error. then to go to address bar and type get_ip.php (love-wallpapers.x10.com/get_.php).  this page show your IP Address.


Note: make sure that you correctly create databse and use right user name and password otherwise this code show error.


Please Comment If you like this post .





3 comments:

Many thanks for making the truthful effort to explain this. I feel very strong about it and would like to read more. If you can, as you find out more in depth knowledge, would you mind posting more posts similar to this one with more information.
hosting companies

It's going to be ending of mine day, however before ending I am reading this great article to improve my experience.\nHave a look at my blog :: Fake Bank Statements

Post a Comment