note 35903 deleted from ref.curl by felipe

From: Date: Sun, 30 Mar 2008 19:10:17 +0000
Subject: note 35903 deleted from ref.curl by felipe
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-137773@lists.php.net to get a copy of this message
Note Submitter: rodrigo dot nakahodo at dhweb dot com dot br ---- The script shows how to get a simple response of a SSL Server. Enjoy it! <?php $defined_vars = get_defined_vars(); $_url = 'https://www.example.com.br'; $_VAR001 = 'nono'; $_VAR002 = 'nonono'; $params = "VAR001=$_VAR001&VAR002=$_VAR002&"; $ch = curl_init(); curl_setopt($ch, CURLOPT_POST,1); curl_setopt($ch, CURLOPT_POSTFIELDS,$params); curl_setopt($ch, CURLOPT_URL,$_url); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); curl_setopt($ch, CURLOPT_USERAGENT, $defined_vars['HTTP_USER_AGENT']); curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); $result=curl_exec ($ch); curl_close ($ch); echo("Output: ".$result); ?>

« previous php.notes (#137773) next »