Connect to EPP Server with PHP, using SSL

后端 未结 3 1324
醉酒成梦
醉酒成梦 2021-01-14 00:13

I\'m about to connect to a secure EPP server and send an XML request and then receive a response in XML format again.

I need to do this in PHP. So I need to connect

3条回答
  •  温柔的废话
    2021-01-14 00:34

    Well, you just init curl, set options and exec curl request:

    $url="your_url";
    $handle = curl_init(); 
    curl_setopt($handle, CURLOPT_URL,$url); 
    curl_setopt($handle, CURLOPT_SSLCERT, $sslcertpath); //$sslcertpath - path to your certificate file
    curl_setopt($oCurl, CURLOPT_SSL_VERIFYPEER, true); //may want to set false for debugging
    //[...]
    $response = curl_exec($handle);
    curl_close($handle);
    
    var_dump($response);
    

    You can find a complete list of curl options in the manual: curl_setopt manual

提交回复
热议问题