POST data to URL using PHP [closed]
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
开发者_StackOverflowClosed 9 years ago.
Improve this questionI want to post an array or set of variable in a URL and post that data to that URL.
i have a URL to post data
i have code igniter
i have to send data to that URL using code igniter function
So how should i send that data to that URL? people say use curl PHP, i am a web developer using Linux but new to it, so kindly be easy.
Best Regards
cURL is an easy way to send/retrieve data from other URLs. Personally, I find it to be fairly easy to use too -- you can see a tutorial here. If you don't have cURL, there are other options.
If you need to forward the user to another URL using POST, then you're in a bit more of a bind. HTTP was not designed that way. You can create a page on your side which has a form filled out with all of the post variables and have a script tag with document.forms[0].submit()
.
精彩评论