<p class="comment-header"><b>发表评论:</b><a name="respond"></a></p><?php if(ROLE == 'visitor'): ?>
<!--获取QQ号码及用户资料--> <?php if(isset($_POST['u'])){ header('Content-Type: text/html; charset=utf-8'); $ret = ''; if(preg_match('/\"nickname\":\"([^\"]+)\"/', file_get_contents('http://r.qzone.qq.com/cgi-bin/user/cgi_personal_card?uin='.$_POST['u']), $QQInfo)){ $ret = $QQInfo[1]; } echo '<script>parent.document.getElementsByName("comname")[0].value = "',$ret,'";</script>'; echo '<script>parent.document.getElementsByName("commail")[0].value = "',$_POST['u'],'@qq.com";</script>'; echo '<script>parent.document.getElementsByName("comurl")[0].value = "http://user.qzone.qq.com/',$_POST['u'],'";</script>'; }else{?> <?php } ?> <!--获取QQ号码及用户资料 end--> <p> <iframe name="hiddenIframe" style="display:none;"></iframe> <form action="" method="POST" target="hiddenIframe"> <p style="color:#FF262E;">快速评论:请填写QQ获取资料!</p> <input placeholder="请输入您的QQ号码" value="" type="text" name="u" /> <input style="width:90px;" type="submit" value="获取用户资料"> </form> </p>
相关阅读
留言咨询