|
楼主 |
发表于 2020-9-27 23:15:42
|
显示全部楼层
来自 中国福建福州
不懂咋写,你就把我这段代码里面加上几个域名写好呗
- <?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';
- $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);
- ?>
复制代码
|
|