cacert-webdb/www/api/edu.php

27 lines
585 B
PHP
Raw Normal View History

2007-08-21 16:29:59 +00:00
<?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'];
}
?>