frame

Incompatibility

I'm trying to send a get request to my php page, the request comes in fact the content of my page shows that the data that I sent are included.
The problem is that in my php page, I can not see them, even printing the global array $ GET tells me is empty. When at the same time zerynth tells me that the content includes my data. It 'a problem of compatibility? The browser should be set in any way?

File Zerynth:

        params1 = {
            "name": "Pisa",
            "address":"Veneto"
        }
       
        user_agent = {"user-agent":"Mozilla/5.0 (iPad; U; CPU OS 3_2_1 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Mobile/7B405"}
       
        url="http://sistemaallagamento.altervista.org/NuovoFile.php?"
      
        response = requests.get(url,user_agent,params=params1)

        print("Success!!",response.status)
        print("-------------")
        print("Content!!",response.content)

NuovoFile.Php:

 <?php
$name = $_GET["name"];
$address = $_GET['address'];

$result = "Il nome " . $name . ", l'indirizzo" . $address;

echo $result;
echo "<pre>";
var_dump($_GET);
echo "</pre>";
?>

can someone help me?

Comments

  • Hi luiss,
    I tried your script and it is working fine: sending a GET request with same parameters from your Photon, make the web page answer with a custom response including name and address variables.
    Opening the web page from your browser, without specifying those parameters in the url, will make it show an empty page.
    To show acquired data on your browser you have to make your php script STORE those data in a database. Then you will be able to retrieve those data from another script and show them in your web page.
    Hope it helps :)
    Lorenzo Rizzello
    Zerynth Support Team

Sign In or Register to comment.

ZERYNTH Community

@ 2016 Zerynth.com, all rights reserved.