Widget HTML Atas

How to POST data with cURL PHP

<?php
$url = 'http://api.myurl.com/mm/status/0/'
$data = 'name=me&address=mystreeet&phone=1234';
        $ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, null);
curl_setopt($ch, CURLOPT_POST, TRUE);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($ch);
curl_close($ch);

No comments for "How to POST data with cURL PHP"

Search Results Computer Programing, technological, Data Appears, RiskTool, games, memory, MIPS Computer Programing, technological, Data Appears, RiskTool, games, memory, MIPS