Ejemplo n.º 1
0
<!--This site includes IP2Location LITE data available from http://lite.ip2location.com-->

<div class="w-section vpaas-sign-up-section">
    <div class="w-container vpaas-signup-container">
	<h1 class="section-headings vpaas-signup-heading">Sign Up &nbsp;<span class="divider-span">|</span> &nbsp;<span class="teal-span">Kaltura VPaaS</span></h1>
        <div class="sml-circle-row-wrapper">
	       <div class="w-row sml-circle-row">
	           <div class="w-col w-col-3 sml-circle-column"></div>
	       </div>
        </div>

<div >
<?php 
require_once '/var/www/html/IP2Location-PHP-Module/IP2Location.php';
$signer_ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
$db = new \IP2Location\Database('/etc/IP2LOCATION-LITE-DB1.BIN', \IP2Location\Database::FILE_IO);
$excluded_countries = array('IR', 'SY', 'SD', 'CU', 'KP');
$records = $db->lookup($signer_ip, \IP2Location\Database::ALL);
if (in_array($records['countryCode'], $excluded_countries)) {
    $msg = 'In compliance with U.S and applicable Export laws we are unable to process your request. Please contact legal@kaltura.com if you believe this to be an error.';
    die('<div class="radio-description">' . $msg . '</div>');
}
?>
    <div class="radio-description">Complete API access for all video workflows, player, widgets, SDKs, developer tools, forums &amp; Kaltura University. Create as many VPaaS Accounts as you need with centralized configuration &amp; consolidated billing across all accounts.</div>
</div>

<div class="w-form">
		
    <form id="register-form" name="register-form" data-name="Register Form" action="https://vpaas.kaltura.com:8443/post_register.php" method="post" onsubmit="return validate(event);">
<input type="hidden" id="ip" value="<?php 
echo $signer_ip;
Ejemplo n.º 2
0
require_once 'IP2Location.php';
/*
   Cache whole database into system memory and share among other scripts & websites
   WARNING: Please make sure your system have sufficient RAM to enable this feature
*/
// $db = new \IP2Location\Database('./databases/IP-COUNTRY-SAMPLE.BIN', \IP2Location\Database::MEMORY_CACHE);
/*
   Cache the database into memory to accelerate lookup speed
   WARNING: Please make sure your system have sufficient RAM to enable this feature
*/
// $db = new \IP2Location\Database('./databases/IP-COUNTRY-SAMPLE.BIN', \IP2Location\Database::MEMORY_CACHE);
/*
	Default file I/O lookup
*/
$db = new \IP2Location\Database('./databases/IP2LOCATION-LITE-DB1.BIN', \IP2Location\Database::FILE_IO);
$records = $db->lookup('8.8.8.8', \IP2Location\Database::ALL);
echo '<pre>';
echo 'IP Number             : ' . $records['ipNumber'] . "\n";
echo 'IP Version            : ' . $records['ipVersion'] . "\n";
echo 'IP Address            : ' . $records['ipAddress'] . "\n";
echo 'Country Code          : ' . $records['countryCode'] . "\n";
echo 'Country Name          : ' . $records['countryName'] . "\n";
echo 'Region Name           : ' . $records['regionName'] . "\n";
echo 'City Name             : ' . $records['cityName'] . "\n";
echo 'Latitude              : ' . $records['latitude'] . "\n";
echo 'Longitude             : ' . $records['longitude'] . "\n";
echo 'Area Code             : ' . $records['areaCode'] . "\n";
echo 'IDD Code              : ' . $records['iddCode'] . "\n";
echo 'Weather Station Code  : ' . $records['weatherStationCode'] . "\n";
echo 'Weather Station Name  : ' . $records['weatherStationName'] . "\n";