diff --git a/security_code.php b/security_code.php new file mode 100644 index 0000000..28b548d --- /dev/null +++ b/security_code.php @@ -0,0 +1,15 @@ +<?php + require_once ("core.php"); + $security_id = md5(rand(6000,getrandmax())); // $security_id = md5(rand(6000,99999999999999991000)); + + header('Content-Type:image/png'); + $url = "http://order.".$domain."/image.php?id=".security_id;//图片链接 + $ch = curl_init(); + //Cookie:PHPSESSID=121b1127dcded8702c6a1e702c40eca4 + curl_setopt($ch, CURLOPT_URL, $url); + // curl_setopt($ch,CURLOPT_COOKIE,'PHPSESSID=121b1127dcded8702c6a1e702c40eca4'); // 如果不需要cookies就删除这条语句 + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 0); + curl_setopt($ch, CURLOPT_TIMEOUT,0); // 忽略超时 + curl_setopt($ch, CURLOPT_NOBODY, false); + $str = curl_exec($ch); + curl_close($ch); diff --git a/test.php b/test.php deleted file mode 100644 index a243049..0000000 --- a/test.php +++ /dev/null @@ -1,3 +0,0 @@ -<?php - print_r($_POST); -?> \ No newline at end of file