You can use any of these
CAKEPHP SOCKET
App::import('Core', 'HttpSocket');
App::uses('HttpSocket', 'Network/Http');
$HttpSocket = new HttpSocket();
$results = $HttpSocket->post('www.somesite.com/add', array('name' => 'test', 'type' => 'user'));
CURL
$url = 'http://domain.com/get-post.php';
$fields = 'var1=value1&var2=value2';
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_POST,count($fields));
curl_setopt($ch,CURLOPT_POSTFIELDS,$fields_string);
$result = curl_exec($ch);
curl_close($ch);
JAVASCRIPTif you want this to be done on the client side
source
share