Created
November 1, 2015 20:00
-
-
Save dewwwald/85b933d8fef31819415c to your computer and use it in GitHub Desktop.
Submit post processed form to salesforce using CURL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function submit_to_salesforce () { | |
$post_fields = http_build_query(array_merge($this->conf_fields, $this->fields)); | |
$ch = curl_init(); | |
curl_setopt($ch,CURLOPT_URL,self::$config['url']); | |
curl_setopt($ch, CURLOPT_POST, 1); | |
curl_setopt($ch,CURLOPT_POSTFIELDS, $post_fields); | |
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true); | |
//execute post | |
$result = curl_exec($ch); | |
curl_close($ch); | |
return $result; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment