3raser Posted March 19, 2012 Share Posted March 19, 2012 Is this the correct way to use http_post_fields? $fields = array('title' => $_POST['title'], 'message' => $_POST['message']); $i = 0; while(1==1) { $i++; http_post_fields('http://www.rs2006.net/services/forums/board.ws?3,4,add', $fields); echo $i.' sent'; } Quote Link to comment https://forums.phpfreaks.com/topic/259230-am-i-doing-this-correctly/ Share on other sites More sharing options...
requinix Posted March 19, 2012 Share Posted March 19, 2012 Does it work? Quote Link to comment https://forums.phpfreaks.com/topic/259230-am-i-doing-this-correctly/#findComment-1328930 Share on other sites More sharing options...
3raser Posted March 19, 2012 Author Share Posted March 19, 2012 No. I'm not sure if it's because my host doesn't support the function? I can't seem to locate the file that shows all the PHP settings. Quote Link to comment https://forums.phpfreaks.com/topic/259230-am-i-doing-this-correctly/#findComment-1328932 Share on other sites More sharing options...
requinix Posted March 19, 2012 Share Posted March 19, 2012 http_post_fields() comes from a PECL extension, and those are less common than the regular extensions. Your host probably has cURL enabled. Try using that instead. Quote Link to comment https://forums.phpfreaks.com/topic/259230-am-i-doing-this-correctly/#findComment-1328934 Share on other sites More sharing options...
3raser Posted March 19, 2012 Author Share Posted March 19, 2012 http://php.net/manual/en/book.curl.php I'm looking at the functions for cURL, and I can't seem to locate the function that allows me to send POST or GET data. Any tips? Quote Link to comment https://forums.phpfreaks.com/topic/259230-am-i-doing-this-correctly/#findComment-1329194 Share on other sites More sharing options...
3raser Posted March 19, 2012 Author Share Posted March 19, 2012 Never mind. I believe I have found a sufficient example regarding this; Seeing as I actually know what functions I'll be working with when it comes to cURL, I can learn more regarding this. (for those curious for the example: http://davidwalsh.name/execute-http-post-php-curl) Quote Link to comment https://forums.phpfreaks.com/topic/259230-am-i-doing-this-correctly/#findComment-1329235 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.