security_code

This commit is contained in:
唐钰豆豆 2017-01-12 02:04:35 +08:00
parent e518b64f13
commit 1947b8d79f
2 changed files with 7 additions and 6 deletions

View file

@ -1,15 +1,16 @@
<?php
require_once ("core.php");
$security_id = md5(rand(6000,getrandmax())); // $security_id = md5(rand(6000,99999999999999991000));
require_once ("core.php");
// $security_id = md5(rand(6000,getrandmax())); // $security_id = md5(rand(6000,99999999999999991000));
$security_id = $_GET["id"];
header('Content-Type:image/png');
$url = "http://order.".$domain."/image.php?id=".security_id;//图片链接
$url = "http://order.uiisc.com/image.php?id=".$security_id."";//图片链接
$ch = curl_init();
//Cookie:PHPSESSID=121b1127dcded8702c6a1e702c40eca4
// 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);
curl_close($ch);

View file

@ -83,7 +83,7 @@
<div class="form-group">
<label for="inputID" class="col-sm-4 control-label" data-i18n="security_code">Security Code</label>
<div class="col-sm-5">
<img width="90px" height="25px" src="//order.<?=$domain?>/image.php?id=<?=$security_id?>">
<img width="90px" height="25px" src="./security_code.php?id=<?=$security_id?>">
<input type="hidden" name="id" class="form-control" id="inputID" placeholder="ID" value="<?=$security_id?>">
</div>
</div>