18-10-2010, 16:02
|
|
|
חבר מתאריך: 14.08.10
הודעות: 107
|
|
post דרך curl מוגבל בתווים?
אהלן,
אני מנסה לשלוח POST עם נתונים לפתיחת נושא בפורום.
הבעייה שההודעה נקטעת לאחר מספר תווים.
גיגלתי ומצאתי שצריך להוסיף
קוד PHP:
curl_setopt($curl,CURLOPT_HTTPHEADER,array("Expect:"));
הוספתי כמובן, אך בלי שום תועלת - ההודעה ממשיכה להיקטע באמצע.
הקוד:
קוד PHP:
$thread = array('subject' => 'כותרת כלשהי', 'message' => 'הודעה ארוכה.............................הודעה ארוכה......................', 'prefixid' => $post['prefixid'], 'iconid' => '0', 's' => '', 'securitytoken' => $secuirtytoken, 'f' => $post['forumid'], 'do' => 'postthread', 'posthash' => $posthash, 'poststarttime' => $poststarttime, 'loggedinuser' => $userid, 'signature' => '1', 'parseurl' => '1');
$curl = curl_init(); curl_setopt($curl,CURLOPT_RETURNTRANSFER,true); curl_setopt($curl,CURLOPT_HTTPHEADER,array("Expect:")); curl_setopt($curl,CURLOPT_INTERFACE,$post['ip']); curl_setopt($curl,CURLOPT_USERAGENT,"Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.10)"); curl_setopt($curl,CURLOPT_REFERER,$post['url'].'/forumdisplay.php?f='.$post['forumid']); curl_setopt($curl,CURLOPT_COOKIEFILE,"cookie.txt"); curl_setopt($curl,CURLOPT_COOKIEJAR,"cookie.txt"); curl_setopt($curl,CURLOPT_URL,$post['url'].'/newthread.php?do=postthread&f='.$post['forumid']); curl_setopt($curl,CURLOPT_POST,true); curl_setopt($curl,CURLOPT_POSTFIELDS,$thread); curl_exec($curl); curl_close($curl);
אשמח להצעות כלשהן
|