Skip to content

Instantly share code, notes, and snippets.

@NaokiStark
Last active January 20, 2016 23:39
Show Gist options
  • Save NaokiStark/1bfac48cf193d9066818 to your computer and use it in GitHub Desktop.
Save NaokiStark/1bfac48cf193d9066818 to your computer and use it in GitHub Desktop.
<?php
$url = 'http://www.taringa.net/ajax/mentions/user';
$fields = array(
'uid' => '25854531' //Id del usuario
);
$fields_string="";
foreach($fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; }
rtrim($fields_string, '&');
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL, $url);
curl_setopt($ch,CURLOPT_POST, count($fields));
curl_setopt($ch,CURLOPT_POSTFIELDS, $fields_string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);
curl_close($ch);
$data = json_decode($result,true);
echo $data['data']['userStatus'];
?>
@Darcyys
Copy link

Darcyys commented Jan 20, 2016

Fabi ♥

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment