本文实例讲述了php实现QQ空间获取当前用户的用户名并生成图片的方法。分享给大家供大家参考。具体如下:
最近发现空间里经常会转载一些含有当前用户昵称和qq号的图片,很好奇,研究了一下原理
原理很简单,图片是利用php生成的,好吧,直接上代码
图片源代码:
<"HTTP_REFERER"]; if($ment == 'http://cnc.qzs.qq.com/qzone/newblog/v5/editor.html'){ header("HTTP/1.0 500 Internal Server Error"); exit;} preg_match("#[0-9]{5,11}#",$ment,$rr); $r=$rr[0]; $webtext=file_get_contents('http://www.phperzone.cn/demo/qqinfo-service.php"Content-type:image/png"); $im=imagecreatefromjpeg("1.jpg"); $black = ImageColorAllocate($im, 56,73,136); $rrr = mb_convert_encoding($rrr, "utf-8","UTF-8"); imagettftext($im,20,0,90,68,$black,"./simsun.ttc",$rrr); imagettftext($im,26,0,87,125,$black,"./simsun.ttc",$r); imagejpeg($im); imagedestroy($im); "htmlcode"><"Content-Type:text/html;charset=utf-8"); $qq = $_GET ["qq"]; echo htmlspecialchars(file_get_contents('http://r.qzone.qq.com/cgi-bin/user/cgi_personal_card'. "" . $qq)); ?>希望本文所述对大家的php程序设计有所帮助。
华山资源网 Design By www.eoogi.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
华山资源网 Design By www.eoogi.com
暂无评论...
更新日志
2024年09月20日
2024年09月20日
- 王菲.2006《菲常好听》引进版[低速原抓WAV+CUE]
- 《三日危情独家的记忆》女角色介绍
- 《天国拯救》拉泰比武大会攻略
- 任天堂推出《马里奥惊奇》NS捆绑包 10月24日发售
- 《孤岛惊魂》能否逆转育碧颓势?曝系列新作正招兵买马
- 天命人呼叫战术轰炸!玩家自制《黑神话:悟空》轰炸机Mod
- 群星.1992-滚石九大天王·十二出好戏【滚石】【WAV+CUE】
- 群星.1994-新滚石九大天王之年度大丫滚石】【WAV+CUE】
- 坣娜.1998-别恋【非常喜】【WAV+CUE】
- 《草原经典 最炫草原风 2CD》[WAV/分轨][980MB]
- 《不烧不选 经典国语极品珍藏》[WAV/分轨][500MB]
- 《绝对主打 流行原创金曲 2CD》[WAV分轨][1.1GB]
- 《赛博朋克2077》更新上线:支持AMD FSR3
- 《塞尔达传说:智慧的再现》提前半个月偷跑,引发玩家担忧
- 战锤40K星际战士2全职业介绍|全职业技能效果一览