Hi mates,
I have a php page called "get_http_vars.php" that's hidden and not browsed in browser and only used to receive HTTP GET response variables from remote server. The
problem the value of $_SESSION is empty when the HTTP GET variables are received (I mean when the page gets response from the remote server). I noticed that when
I browse the page in browser like: http://localhost/get_http_vars.php, then $_SESSION will get its value.
Now please can you advise, how can I get the $_SESSION value in this page? Is there any way to pass it's value to the page where it's hidden and non browsed?
Please see the code below.
Thanks.
<?php
session_start();
$id = $_SESSION['id']; // $_SESSION['id'] is empty.
//=========== GET variables from remote server=================
if (isset($_GET['var1']))
$var1 = trim($_GET['var1']);
if (isset($_GET['var2']))
$var2 = trim($_GET['var2']);
if (isset($_GET['var3']))
$var3 = trim($_GET['var3']);
?>