Ver Mensaje Individual
  #1 (permalink)  
Antiguo 29/02/2016, 16:55
cmeneses13
 
Fecha de Ingreso: febrero-2016
Mensajes: 3
Antigüedad: 8 años, 2 meses
Puntos: 0
Mensaje obtener datos de otra web

Tengo dos archivos search.php (aqui yo introduzco los seriales de unos carros, para que me muestre el reporte de ese carro) y report.php, tengo una cuenta en https://www.carfax.es y quiero que el reporte que me muestra se me muestre en otra web que tengo o en el mismo report, como pueden ayudarme muestro los dos codigos:

search.php
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
<title>Searching</title>
</head>
<body>
<div style="margin-top:100px">
<table border="0" cellspacing="0px" width="250px" height="50px" align="center">
<tr>
<td>
<form name="formulario" method="post" action="report.php">
<input type="submit" value="Buscar" title="Buscador" />
<input type="text" name="vinc" placeholder="1234ABC" autocomplete="off" maxlength="18" />
</form>
</td>
</tr>
</table>
</div>
</body>
</html>

report.php
<?php
$report = $_POST['vinc'];
//echo '<a href="https://www.carfax.es/frcajax/'.$report.';">Reporte Cargado...</a>';
//$url = 'https://www.carfax.es/frcajax/'.$report;

//$str = file_get_contents ('$url');
//echo htmlentities($str);

$url = "https://www.carfax.es/frcajax/" . urlencode($report);
//$data = file_get_contents($url);

?>

<form method="post" action="https://www.carfax.es/frcajax/<?php echo $report; ?>" target="_self">
<input type="submit" value="Siguiente" title="Seguir" />
<input type="hidden" name="report_id" value=""/>
</form>

<!--
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Report</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js" type="text/javascript"></script>
<script>
function cargar(){
var url="tabla.php"
$.ajax({
type: "POST",
url:url,
data:{},
success: function(datos){
$('#rep').html(datos);
}
});
}
</script>
</head>
<body>
<div>
<a href="#" onclick="cargar();">Siguiente</a>
</div>
<div id="rep"></div>
</body>
</html>
-->