master
IoTcat 5 years ago
parent 417ac8f4d1
commit 04aa00c17f
  1. 4
      server/cn/home/www/api/www-api/photo/index.php
  2. 2
      server/cn/home/www/api/www-api/pic/index.php
  3. 4
      server/cn/home/www/functions.php

@ -1,4 +1,5 @@
<?php <?php
include '../../../functions.php';
header('Access-Control-Allow-Origin:*'); header('Access-Control-Allow-Origin:*');
@ -36,4 +37,7 @@ if(!isset($_REQUEST['k'])){
} }
yimian__log("log_api", array("api" => "photo", "timestamp" => date('Y-m-d H:i:s', time()), "ip" => ip2long(get_ip()), "_from" => get_from(), "content" => $_REQUEST['i']."/".$id));
die(); die();

@ -1,4 +1,5 @@
<?php <?php
include '../../../functions.php';
header('Access-Control-Allow-Origin:*'); header('Access-Control-Allow-Origin:*');
$n_draw = 473; $n_draw = 473;
@ -99,6 +100,7 @@ if(!isset($_REQUEST['k'])){
} }
} }
yimian__log("log_api", array("api" => "pic", "timestamp" => date('Y-m-d H:i:s', time()), "ip" => ip2long(get_ip()), "_from" => get_from(), "content" => $r."/".$id));
die(); die();

@ -407,9 +407,7 @@ return ($ip);
/** get from address **/ /** get from address **/
function get_from(){ function get_from(){
if($_SERVER['remote_addr']) return $_SERVER['remote_addr']; if($_SERVER['HTTP_REFERER']) return $_SERVER['HTTP_REFERER'];
elseif($_SERVER['HTTP_HOST']) return $_SERVER['HTTP_HOST'];
elseif($_SERVER['HTTP_REFERER']) return $_SERVER['HTTP_REFERER'];
elseif($_REQUEST['from']) return $_REQUEST['from']; elseif($_REQUEST['from']) return $_REQUEST['from'];
} }

Loading…
Cancel
Save