26 lines
585 B
PHP
26 lines
585 B
PHP
<?php
|
|
$ipadress =$_SERVER['REMOTE_ADDR'];
|
|
|
|
if ($ipadress=='72.36.220.19' && $_SERVER['HTTPS']=="on")
|
|
{
|
|
$serial=mysql_escape_string($_REQUEST["serial"]);
|
|
$root=intval($_REQUEST["root"]);
|
|
|
|
$sql="select memid from emailcerts where serial='$serial' and rootcert='$root'";
|
|
$query= mysql_query($sql);
|
|
if(mysql_num_rows($query) != 1)
|
|
{
|
|
echo "NOT FOUND: $sql";
|
|
}
|
|
else
|
|
{
|
|
$memid = mysql_fetch_assoc($query);
|
|
echo $memid['memid'];
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo "UNAUTHORIZED ACCESS ".$ipadress." ".$_SERVER['HTTPS'];
|
|
}
|
|
?>
|
|
|