-1
I need a help I have a page on an X server and I need to get another page from the Y server. I tried on ajax
and I couldn’t so I had to use the iframe
, but I need to pass a parameter to the destination page of the Y server and it is not working?
Below follow the codes:
Source X Server Page
<?php
error_reporting(0);
ini_set("display_errors", 0 );
session_start();
$perfil = $_SESSION['perfil'];
echo $perfil;
?>
<br>
<iframe
style="border: 0;"
src="https://172.20.220.50/webservice/listaRetorno.php?perfil=teste"
width="100%"
height="100%"
frameborder="0"
scrolling="no">
</iframe>
Y server page that returns in the above code iframe:
// $perfil = $_POST['perfil'];
$perfil = $_GET['perfil'];
echo $perfil;
Take a look here: https://developer.mozilla.org/pt-PT/docs/Web/API/Window/postMessage
– Marcelo Vismari