Ver Mensaje Individual
  #4 (permalink)  
Antiguo 27/12/2013, 08:34
xoceunder
 
Fecha de Ingreso: junio-2012
Ubicación: En el Mundo
Mensajes: 759
Antigüedad: 11 años, 10 meses
Puntos: 10
Respuesta: duda de como poder ejecutar enlace

Cita:
Iniciado por angelAparicio Ver Mensaje
Tienes que usar la herramienta curl.

Por ejemplo, si defines esta función

Código PHP:
Ver original
  1. function http_request($uri, $time_out = 5, $headers = 0) {
  2.     // Initializing
  3.     $ch = curl_init();
  4.  
  5.     // Set URI
  6.     curl_setopt($ch, CURLOPT_URL, trim($uri));
  7.     curl_setopt($ch, CURLOPT_HEADER, $headers);
  8.     curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  9.     curl_setopt($ch, CURLOPT_TIMEOUT, $time_out);
  10.     $result = curl_exec($ch);
  11.  
  12.     curl_close($ch);
  13.  
  14.     return $result;
  15. }

Pues llamar a la url así:
Código PHP:
Ver original
  1. $respuesta = http_request('http://user:[email protected]:9000/user_edit.html?user=1&pwd=1&description=test&disabled=0&expdate=2014-01-18&action=Save&newuser=');

En $respuesta tendrás el contenido de ejecutar la URL, por si necesitas algún tipo de respuesta.

no me deja dice Access denied. al parecer no esta dejando efectuar el proceso pero escribo el link en el navegador y asi me deja