note 108895 added to wrappers.http

From: Date: Sat, 02 Jun 2012 11:38:35 +0000
Subject: note 108895 added to wrappers.http
Groups: php.notes 
Request: Send a blank email to php-notes+get-188369@lists.php.net to get a copy of this message
If you want to communicate between your server and a https server <?php $variable =$_GET['variable']; $host = "https://user:password@secure site"; $path = "securescript.php"; $url=$host.$path; $formdata = array ( "variable1" => "10000","variable2" => "02" , "variable3" => "03" ); // get form data in a string foreach($formdata AS $key => $val){ $poststring .= urlencode($key) . "=" . urlencode($val) . "&"; } // strip off trailing ampersand $poststring = substr($poststring, 0, -1); // create a complete nice string $urlcom= $host.$path."?".$poststring; // echo $urlcom; // if you want to debug your string //and you can read out the data in one command... from a secure https server handling login and everything you need $postdataget=file_get_contents($urlcom); // and yes you can debug the responseheader to view if you have authorization // var_dump($http_response_header); //and if you want to read the data, this is the response from the server // var_dump($postdataget); ?> ---- Server IP: 69.147.83.197 Probable Submitter: 213.118.214.196 ---- Manual Page -- http://www.php.net/manual/en/wrappers.http.php Edit -- https://master.php.net/note/edit/108895 Del: integrated -- https://master.php.net/note/delete/108895/integrated Del: useless -- https://master.php.net/note/delete/108895/useless Del: bad code -- https://master.php.net/note/delete/108895/bad+code Del: spam -- https://master.php.net/note/delete/108895/spam Del: non-english -- https://master.php.net/note/delete/108895/non-english Del: in docs -- https://master.php.net/note/delete/108895/in+docs Del: other reasons-- https://master.php.net/note/delete/108895 Reject -- https://master.php.net/note/reject/108895 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#188369) next »