本博客文章已转移到独立博客,请点击做最好的三三查看全文。

给 三三 留言

登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter

笨小孩 说:
Oct 25, 2012 02:37:57 PM

<!--?php $url="http://www.simsimi.com/talk.htm?lc=ch"; // 初始化CURL $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HEADER, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $content = curl_exec($ch); curl_close($ch); list($header, $body) = explode("\r\n\r\n", $content); preg_match("/set\-cookie:([^\r\n]*)/i", $header, $matches); // curl_setopt($ch, CURLOPT_COOKIE, $cookie); $cookie = $matches[1]; $urll='http://www.simsimi.com/func/req?msg='.urlencode($_REQUEST['msg']).'&lc=ch'; // 初始化CURL $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $urll); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_COOKIE, $cookie); $content = curl_exec($ch); curl_close($ch); $json=$content; $json=json_decode($json,1); if(isset($json['response'])){ $reply=$json['response']; echo $reply; }else{ return false; } ?-->

<?php
$url="http://www.simsimi.com/talk.htm?lc=ch";
// 初始化CURL
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$content = curl_exec($ch);
curl_close($ch);
list($header, $body) = explode("\r\n\r\n", $content);
preg_match("/set\-cookie:([^\r\n]*)/i", $header, $matches);
// curl_setopt($ch, CURLOPT_COOKIE, $cookie);
$cookie = $matches[1];
 
$urll='http://www.simsimi.com/func/req?msg='.urlencode($_REQUEST['msg']).'&lc=ch';
// 初始化CURL
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $urll);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_COOKIE, $cookie);
$content = curl_exec($ch);
curl_close($ch);
    $json=$content;
    $json=json_decode($json,1);
    if(isset($json['response'])){
        $reply=$json['response'];
        echo $reply;
    }else{
return false;
}
?>
 
 
为什么我这么写不能返回结果了?
音乐发烧 说:
Jul 24, 2012 07:31:45 PM

QQ:1330038296
您费心了,希望能和您交流学习编程知识。

Avatar_small
三三 说:
Jul 19, 2012 10:53:02 AM

你好,您的邮箱无法送信……请留下您的QQ,我会和你联系。

音乐发烧 说:
Jul 18, 2012 09:49:35 AM

特来请教高人,是否对rayfile网盘外联文件有研究???

Host by is-Programmer.com

Power by Chito 1.3.1 beta

| Theme: Aeros 2.0 by TheBuckmaker.com