获取lofter官方首页背景壁纸

QQ截图20180531145115.png

这个小姐姐挺好看的!磨皮不错!

今天看到lofter的首页壁纸特别好看!

然后准备偷偷接口,最后发现他的接口是dwr的

没办法,处理一下,命令如下

获取lofter壁纸的地址,存到数组里面,剩下的步骤自己完成吧!

<?php
$url='http://www.lofter.com/dwr/call/plaincall/ActMiscBean.getLatestIndexImages.dwr';
$post='callCount=1&scriptSessionId=${scriptSessionId}187&c0-scriptName=ActMiscBean&c0-methodName=getLatestIndexImages&c0-id=0&c0-param0=number:100&batchId=126886&';
$referer='http://www.lofter.com/login?urschecked=true';
$rel= get_curl($url,$post,$referer);
preg_match_all('/imageUrl=[\"\'](.*?)[\"\']/i',$rel,$matches);
print_r($matches);
function get_curl($url, $post=0, $referer=0, $cookie=0, $header=0, $ua=0, $nobaody=0){
	$ch = curl_init();
	curl_setopt($ch, CURLOPT_URL, $url);
	curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
	curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
	$httpheader[] = "Accept:application/json";
	$httpheader[] = "Accept-Encoding:gzip,deflate,sdch";
	$httpheader[] = "Accept-Language:zh-CN,zh;q=0.8";
	$httpheader[] = "Connection:close";
	curl_setopt($ch, CURLOPT_HTTPHEADER, $httpheader);
	if ($post) {
		curl_setopt($ch, CURLOPT_POST, 1);
		curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
	}
	if ($header) {
		curl_setopt($ch, CURLOPT_HEADER, true);
	}
	if ($cookie) {
		curl_setopt($ch, CURLOPT_COOKIE, $cookie);
	}
	if($referer){
		if($referer==1){
			curl_setopt($ch, CURLOPT_REFERER, 'http://m.qzone.com/infocenter?g_f=');
		}else{
			curl_setopt($ch, CURLOPT_REFERER, $referer);
		}
	}
	if ($ua) {
		curl_setopt($ch, CURLOPT_USERAGENT, $ua);
	}
	else {
		curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Linux; U; Android 4.0.4; es-mx; HTC_One_X Build/IMM76D) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0");
	}
	if ($nobaody) {
		curl_setopt($ch, CURLOPT_NOBODY, 1);
	}
	curl_setopt($ch, CURLOPT_TIMEOUT, 3);
	curl_setopt($ch, CURLOPT_ENCODING, "gzip");
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
	$ret = curl_exec($ch);
	curl_close($ch);
	return $ret;
}


转载请注明出处 AE博客|墨渊 » 获取lofter官方首页背景壁纸

相关推荐

发表评论

路人甲

网友评论(8)

审查元素   http://imgcdn.ph.126.net/UZkXTzO-A7jPMNzqA9ZAzA==/6632491633259813254.jpg
原地打转 6年前 (2018-06-08) 回复
审查元素不是可以弄吗
<div class="m-logbg m-logbg2">
        <img id="bg2" src="http://imglf4.nosdn.127.net/img/YjNkVUhieFJnMFRRelV5aFhld1NYZG1BZHpiMDNUc3ZVOHZvNm1zemJWN3RIaHF0YTE1WTNBPT0.jpg?imageView&amp;thumbnail=1920y1280&amp;type=jpg&amp;quality=96&amp;stripmeta=0&amp;type=jpg" style="visibility: hidden; opacity: 1; height: auto; width: 1663px; margin-top: -160.833px; margin-left: 0px;">
        <span class="bgshadow"></span>
    </div>
川川 6年前 (2018-06-08) 回复
@川川:审核元素 只能一张啊!要的是 一直用!!!
墨渊 6年前 (2018-06-08) 回复
@墨渊:
原地打转 6年前 (2018-06-08) 回复
咦。这就没意思了。你直接给偷下来嘛
Latewish 6年前 (2018-05-31) 回复
@Latewish:偷下来,不是浪费自己服务器么
墨渊 6年前 (2018-05-31) 回复
@墨渊:
Latewish 6年前 (2018-05-31) 回复
@墨渊:能占多少次ʕ•̫͡•ིʔྀ。+゚♪ʕ•̫͡•ིʔ
6年前 (2018-06-03) 回复