I have the following cURL post function i just whipped up after googling around a little. I haven't used cURL before so please assist me in making the function better if you can :P
The problem I'm having is after echoing the $ch variable it says 'Resource id #something'. How can I get it to remove this without stripping the last so many characters (the number seems to vary)? Also, what is stored inside the $ch array? I tried print_r to it but theirs so much content it's hard to see.
Thanks, the function you posted seems to work smoothly, so far. THe other thing I need is the original post function that I'm replacing returned an array set up with the header, content, and status. This is the post function below (to help add the other parts in if possible)
The problem I'm having is after echoing the $ch variable it says 'Resource id #something'. How can I get it to remove this without stripping the last so many characters (the number seems to vary)? Also, what is stored inside the $ch array? I tried print_r to it but theirs so much content it's hard to see.
Thats because $ch is a resource HANDLE. It isn't a string, array or any other item that can be printed to the screen. It's the same principle as a mysql resource.
//Please don't use this for your form processing:
if (isset($_POST['submit']))
//Internet explorer has a bug and does not always send the submit value.