note 111378 added to curl.examples-basic

From: Date: Thu, 14 Feb 2013 06:15:06 +0000
Subject: note 111378 added to curl.examples-basic
Groups: php.notes 
Request: Send a blank email to php-notes+get-193628@lists.php.net to get a copy of this message
<?php $url = 'localhost:10081/ZendServer/res.php'; $data = array("first_name" => "First name","last_name" => "last name","email"=>"email@gmail.com","addresses" => json_encode(array ("address1" => "some address" ,"city" => "city","country" => "CA", "first_name" => "Mother","last_name" => "Lastnameson","phone" => "555-1212", "province" => "ON", "zip" => "123 ABC" ) ) ); $ch=curl_init($url); $data_string = json_encode($data); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($ch, CURLOPT_POSTFIELDS, array("customer"=>$data_string)); $result = curl_exec($ch); curl_close($ch); echo $result; ?> ---- Server IP: 69.147.83.199 Probable Submitter: 220.225.66.114 ---- Manual Page -- http://php.net/manual/en/curl.examples-basic.php Edit -- https://master.php.net/note/edit/111378 Del: integrated -- https://master.php.net/note/delete/111378/integrated Del: useless -- https://master.php.net/note/delete/111378/useless Del: bad code -- https://master.php.net/note/delete/111378/bad+code Del: spam -- https://master.php.net/note/delete/111378/spam Del: non-english -- https://master.php.net/note/delete/111378/non-english Del: in docs -- https://master.php.net/note/delete/111378/in+docs Del: other reasons-- https://master.php.net/note/delete/111378 Reject -- https://master.php.net/note/reject/111378 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#193628) next »