PHP Classes

File: example_newV.php

Recommend this page to a friend!
  Classes of zinsou A.A.E.Moïse   Very Simple IP Details   example_newV.php   Download  
File: example_newV.php
Role: Example script
Content type: text/plain
Description: example script for new version
Class: Very Simple IP Details
Get IP address location and Google Maps image
Author: By
Last change:
Date: 6 years ago
Size: 655 bytes
 

Contents

Class file image Download
<?php
//DATABASE DETAILS
//SET HOSTNAME
$hostname = "localhost";

//MYSQL USERNAME
$username ="root";

//MYSQL PASSWORD
$password="";

//MYSQL DATABASE NAME
$database="cms";

//DATABASE CONNECTION


try
{
$bdd=new PDO('mysql:host='.$hostname.';dbname='.$database,$username,$password,array(PDO::ATTR_ERRMODE=> PDO::ERRMODE_EXCEPTION));

}
catch(
Exception $e)
{
    die(
'Erreur:'.$e->getMessage());
}
//DATABASE CONNECTION CODE END
include("class.ipdetails.php");
$ip="66.84.41.158";
$myip=new vsipdetails($ip,$bdd);
echo
'<pre>';
print_r ($myip->scan());
echo
$myip->get_map('12');
$myip->close();
$myip->cacheThis();
?>