siddscool19 Posted October 16, 2008 Share Posted October 16, 2008 Hey people I want to post on my forum using phpbb3 script? Is there any such script? And also I have created the codings for posting and its working but the problem is that I can't send large data using it only like 5-6 lines I mean the phpbb3 forum is accepting only 5-6 lines: <?php $content=$_POST["content"]; echo $content; $url = "http://localhost/phpbb3/ucp.php?mode=login"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,$url); curl_setopt($ch, CURLOPT_POST, 4); curl_setopt($ch, CURLOPT_POSTFIELDS,"username=username&password=pass&redirect=&login=Login"); curl_setopt($ch,CURLOPT_RETURNTRANSFER,1); curl_setopt($ch,CURLOPT_FOLLOWLOCATION,1); curl_setopt($ch,CURLOPT_COOKIEJAR,"cookie.txt"); $result= curl_exec ($ch); curl_close ($ch); $data="hiiiiiiii"; $valuesubmit=array( "icon"=>0, "subject"=>"hiii", "message"=>$data, "lastclick"=>1224168250, "post"=>"Submit", "form_token"=>"cc7ee8be585ac8a58c1dc356c56d36ac623dd717", "creation_time"=>"1224168251" ); $ch2 = curl_init(); curl_setopt($ch2,CURLOPT_URL,"http://localhost/phpbb3/posting.php?mode=post&f=2"); curl_setopt($ch2,CURLOPT_REFERER, "http://localhost/phpbb3/posting.php?mode=post&f=2"); curl_setopt($ch2, CURLOPT_POST, 4); curl_setopt($ch2, CURLOPT_POSTFIELDS,$valuesubmit); curl_setopt($ch2,CURLOPT_RETURNTRANSFER, true); curl_setopt($ch2,CURLOPT_CONNECTTIMEOUT,"120"); curl_setopt ($ch2, CURLOPT_HEADER, false ); curl_setopt($ch2,CURLOPT_COOKIEFILE,"cookie.txt"); $souvik123 = curl_exec($ch2); $error=curl_error($ch2); curl_close($ch2); echo $error; echo $souvik123; ?> Link to comment https://forums.phpfreaks.com/topic/128718-post-on-phpbb3-forum-using-curl/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.