emlog:大前端QQ评价正在获取中错误了

换地址接口没用发现代码不是原来,把两个代码替换解决QQ不能自动问题

function.php

<?php //获取QQ信息
function getqqtx($qq){
	$url="http://q.qlogo.cn/headimg_dl?bs=qq&amp;dst_uin=$qq&amp;src_uin=qq.feixue.me&amp;fid=blog&amp;spec=100";
	return $url;}
if(isset($_POST['qq'])){
	if(empty($_POST['qq'])){
		echo "@@({comname:'QQ账号错误',commail:'QQ账号错误',comurl:'QQ账号错误',toux:'http://q.qlogo.cn/headimg_dl?bs=qq&dst_uin=34109680&src_uin=qq.feixue.me&fid=blog&spec=100'})@@";
		return ;
	}
	$spurl = "http://users.qzone.qq.com/fcg-bin/cgi_get_portrait.fcg?uins={$_POST['qq']}";
	$data = file_get_contents($spurl);
	$nc=explode('"',$data);
	$s=$nc[5];
	$bm=mb_convert_encoding($s,'UTF-8','UTF-8,GBK,GB2312,BIG5');
	if(empty($bm)){echo "@@({comname:'QQ账号错误',commail:'QQ账号错误',comurl:'QQ账号错误',toux:'http://q.qlogo.cn/headimg_dl?bs=qq&dst_uin=10001&src_uin=qq.feixue.me&fid=blog&spec=100'})@@";}
else{echo "@@({comname:'{$bm}',commail:'{$_POST['qq']}@qq.com',comurl:'http://user.qzone.qq.com/{$_POST['qq']}',toux:'http://q.qlogo.cn/headimg_dl?bs=qq&dst_uin={$_POST['qq']}&src_uin=qq.feixue.me&fid=blog&spec=100'})@@";}}
function getqqxx($qq,$role=''){
	if(!empty($role)){
		return $role;
	}
	$ssud=explode("@",$qq,2);
	if($ssud[1]=='qq.com'){
	return getqqtx($ssud[0]);
	}else{	
	return MyGravatar($qq,$role);	
}}
?>

main.js

function huoquqq() {
	$('#loging').html('<img src="'+jsui.uri+'/images/loading.gif" rel="nofollow" ><a style="font-size:12px;margin-left:5px;">\u6b63\u5728\u83b7\u53d6QQ\u4fe1\u606f..</a>');
	var urls = window.location.href;
	$.ajax({
		url: urls,
		type: "POST",
		data: {
			"qq": $('#qqnum').val()
		},
		dataType: "html",
		success: function(c) {
			var josn = eval("" + c.split('@@')[1].split('@@')[0] + "");
			$('#loging').html(" ");
			$('#comname').val(josn.comname);
			$('#commail').val(josn.commail);
			$('#comurl').val(josn.comurl);
			$(".none_user").html(josn.comname);
			$('#toux').attr("src", josn.toux);
		}
	});
}
本博客所有文章归地球者:ALIN迷茫复制或转载请以超链接形式注明转自 北纳星_52bnx.cn
原文地址《emlog:大前端QQ评价正在获取中错误了

相关推荐

发表评论

路人甲

网友评论(0)