Ver Mensaje Individual
  #5 (permalink)  
Antiguo 16/01/2013, 19:58
hermes_patrick
 
Fecha de Ingreso: abril-2006
Ubicación: miraflores
Mensajes: 69
Antigüedad: 18 años
Puntos: 1
Respuesta: Php post http request

Gracias, revise el aporte ofrecido líneas arriba y conseguí hacer esto, que podría estar mal ? que me falta ? cuando lo compilo parece que se queda cargando la página pero no sucede nada mas:

Código PHP:
<?php
$str_obj_json
='{
"method":"SUBMIT","params":{
"batchType":"submit",
"batchId":"alvarons",
"origAddr":"550",
"origTon":2,
"userData":"Movistar les desea Feliz Navidad",
"submits":
  [
   {
   "messId":"mess127_001",
   "destAddr":"51975375377"}
  ]
}
}'
;
$ch curl_init('http://10.10.237.8:21098/SMBULK/BATCH');
curl_setopt($chCURLOPT_CUSTOMREQUEST"POST");
curl_setopt($chCURLOPT_POSTFIELDS$str_obj_json);
curl_setopt($chCURLOPT_RETURNTRANSFERtrue);
curl_setopt($chCURLOPT_HTTPHEADER, array(
    
'Content-Type: application/x-www-form-urlencoded',
    
'Content-Length: 395',
    
'Authorization: Basic dGVzdDp0ZXN0',
    
'User-Agent: Wget/1.12 (solaris2.10)',
    
'Connection: Keep-Alive',
    
'Accept: */*')
);
$result curl_exec($ch);
?>
__________________
Patrick:policia: