Ver Mensaje Individual
  #5 (permalink)  
Antiguo 19/04/2012, 11:17
Avatar de oscartt67
oscartt67
 
Fecha de Ingreso: abril-2012
Ubicación: fonollosa
Mensajes: 481
Antigüedad: 12 años
Puntos: 97
Respuesta: Llamada a otro php pasandole POST

Hola de nuevo.
Al no tener ni uidea de como hacerlo, lo he buscado y he encontardo lo siguinete en otro foro:


[URL="http://www.latindevelopers.com/forum/ejecutar-url-t4991.html"]http://www.latindevelopers.com/forum/ejecutar-url-t4991.html[/URL]
Código PHP:
<?php
$datos_post 
http_build_query(
    array(
        
'var1' => 'alguna cosa',
        
'var2' => 'doh'
    
)
);
$opciones = array('http' =>
    array(
        
'method'  => 'POST',
        
'header'  => 'Content-type: application/x-www-form-urlencoded',
        
'content' => $datos_post
    
)
);

$contexto  stream_context_create($opciones);
$resultado file_get_contents('http://example.com/submit.php'false$contexto);
?>

Ya diras si sirve...
Saludos