|
楼主 |
发表于 2020-9-27 12:54:19
|
显示全部楼层
来自 中国福建福州
本帖最后由 baihaideng 于 2020-9-27 12:58 编辑
是这样码?
<?php
$url = null;
if(count($_GET) > 1){
foreach ($_GET as $key => $v) {
if($key != 'url'){
$url .= '&'.$key.'='.$v;
}else{
$url .= $v;
}
}
}else{
$url = $_GET['url'];
}
//伪造 网址 referer
$refer = 'http://www.a.net';
$refer = 'http://www.b.net';
$refer = 'http://www.c.net';
$refer = 'http://www.d.net';
$refer = 'http://www.e.net';
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_REFERER, $refer);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_BINARYTRANSFER, 1);
$data = curl_exec($ch);
curl_close($ch);
header("Content-type: image/jpeg");
print($data);
?>
-------------------刚试了,这样写没有用,只能调用www.a.net的,b,c,d等均不行------------------- |
|