![]() The plugin automatically collects the data downloaded and your script can query the result later. The option CURLOPT_RETURNTRANSFER in PHP is not needed by the plugin. So we use the calls MBS(" CURL.SetOptionSSLVerifyPeer" $curl 0) and MBS(" CURL.SetOptionSSLVerifyHost" $curl 0). But in this example we simply disable verification. First for SSL, you should use a certificate to have the plugin verify the identity of the server. This function starts a new session and we store it in a variable, exactly as in PHP. In FileMaker, the call to the MBS plugin is MBS(" CURL.New"). This handle value (a number) is than used to to reference the CURL session later in the script. The result is the handle which is stored in $ch variable. ![]() First line is "$ch = curl_init() " which simply creates a new curl session in PHP. So lets go through the script line by line. Here is a PHP script:Ĭurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false) Ĭurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false) Ĭurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1) Ĭurl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST") Ĭurl_setopt($ch, CURLOPT_POSTFIELDS, $params) Ĭurl_setopt($ch, CURLOPT_HTTPHEADER, array( ![]() Today we want to show you how to translate a PHP script with CURL commands step by step to a FileMaker script. Translate PHP script with CURL to FileMaker Script ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |