<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        text-align:justify;
        text-justify:inter-ideograph;
        font-size:10.5pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        text-align:justify;
        text-justify:inter-ideograph;
        font-size:8.0pt;
        font-family:"Calibri","sans-serif";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";}
.MsoChpDefault
        {mso-style-type:export-only;}
/* Page Definitions */
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="2050" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=ZH-CN link=blue vlink=purple style='text-justify-trim:punctuation'>
<div class=Section1>
<p class=MsoNormal><span lang=EN-US>Hi ,All:<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US> The
contents of following is the part of my edit page’s program. <o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:21.0pt;text-indent:21.0pt'><span
lang=EN-US>There are no response if I use this program to modify some pages
content , but some pages are ok.<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:21.0pt;text-indent:21.0pt'><span
lang=EN-US>Could you please to help me to look at whether there is something
wrong? Thanks.<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:21.0pt;text-indent:21.0pt'><span
lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US> …..<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US> $post
=
"title=$name&action=edit&basetimestamp=$ts&starttimestamp=$sts&token=$token&summary=$summary$extra&text=$newtext";<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US> $response
= $this->postAPI($wiki, 'api.php', $post);<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US> ……<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US> private
function postAPI($wiki, $url, $postdata = "") {<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>
$wiki = $this->wiki($wiki);<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>
$ch = curl_init();<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>
$url = $wiki . $url;<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>
if ($postdata !== "") {<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>
$postdata .= "&";<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>
}<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>
$postdata .= "format=php&maxlag=" . $this->max_lag;<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>
//echo $url.'?'.$postdata;exit;<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>
//echo "Final postdata: $postdata<br />\n";<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>
curl_setopt($ch, CURLOPT_URL, $url);<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>
curl_setopt($ch, CURLOPT_POST, 1);<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>
curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookie.txt');<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>
curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookie.txt');<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>
curl_setopt($ch, CURLOPT_POSTFIELDS, $postdata);<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type:
application/x-www-form-urlencoded;charset=UTF-8'));<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>
curl_setopt($ch, CURLOPT_HEADER, false);<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>
$response = curl_exec($ch);<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>
//print_r( unserialize($response));exit;<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>
if (curl_errno($ch)) {<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>
return curl_error($ch);<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>
}<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>
curl_close($ch);<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>
return unserialize($response);<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US> }<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US><img width=680 height=112
id="Picture_x0020_1" src="cid:image001.png@01C9E9EE.A6114E10"></span><span
lang=EN-US><o:p></o:p></span></p>
</div>
</body>
</html>