Category Archives: CURL

How to Submit form through PHP CURL ?

Last week I was working with salesforce form to collect data from third party website. If you have to just submit form its easy salesforce does not restrict to use CURL in order to post data but my requirement was to post salesforce from data and store that data in my database too. This is easy and simple and has a lot of ways to do.
Now I would like to show you PHP CURL way to post form data. You can use PHP Jquery and Ajax to make it more fancy. But I want to keep it simple.
Step 1 –
I am using one sales force form as example.

Step 2  –  This is standard PHP CURL script (form-action-curl.php) to post from you can use anywhere without any modification in from you can add more fields if you need.


How to test HTTPS CURL in development server?

HTTPS is secure HTTP communication based on SSL protocol (HTTP over SSL). Generally all sensitive info (like passwords, financial details, etc.) are sent over this transport. Common example: your gmail login is done through HTTPS channel and different payment gateway.
So here in this deal –

CURLOPT_SSL_VERIFYHOST is off. This allows you to test the CURL in your dev server without having HTTPS. PHP/Curl will handle the http request.