Skip to content

Instantly share code, notes, and snippets.

@carloslopez1990
Created May 16, 2015 22:49
Show Gist options
  • Save carloslopez1990/c29f5acb810a21e8d96d to your computer and use it in GitHub Desktop.
Save carloslopez1990/c29f5acb810a21e8d96d to your computer and use it in GitHub Desktop.
<?php
# P0C: Movistar PostPago 2 Nombre utiizando puntofacil.us
# por Carlos Ernesto López <celopez1990.blogspot.com>
function getNombreMovistar( $num ) {
$ch = curl_init( 'https://www.puntofacil.us/getBills' );
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json;charset=UTF-8'));
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"colector":"4FED27A6-FD4A-4E52-88B0-405EDF90F110","servicio":"D2BB76E2-CAAB-426B-883C-A7ED0B15C5A9","tipoB":"250669A4-6F7C-E211-B93B-BC5FF42EE8D2","idParm":"'.$num.'","user":{"name":"C Ernesto López","_id":"547aac1656ed4c266d8aedae","username":"hi.oriondev","roles":["authenticated"],"provider":"facebook","email":"hi.oriondev@gmail.com","ipSource":"186.77.196.142","telephoneset":false}}');
$res = json_decode( curl_exec($ch) );
return $res[0]->nombres;
}
print getNombreMovistar(83704111);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment