Passing on values when opening a file with file()?
Posted: Thu Sep 27, 2007 4:40 am
I wonder if there is a way of passing on values when opening a file?
I have a script on a domain that does some calculations from the database on that domain, I access this script from another domain using the following code:
The array $data_array returns the default values for the data as it does not pick up the variables passed in the URL, anyone know if there is a way of picking these passed variables up in get_data_calc.php?
I have tried using $_GET in the get_data_calc.php file but that does not work, also tried using
$theurl = $_SERVER['REQUEST_URI']; then breaking up $theurl to get the variable values but using $_SERVER['REQUEST_URI'] just stops the script from running in this case.
Do I have any other options on this?
I have a script on a domain that does some calculations from the database on that domain, I access this script from another domain using the following code:
Code: Select all
$THE_STRING = file("http://domain/folder/php/get_data_calc.php?l=$l&d=$d&m=$m&y=$y");
$data_array = explode("|",$THE_STRING[0]);
print_r ($data_array);I have tried using $_GET in the get_data_calc.php file but that does not work, also tried using
$theurl = $_SERVER['REQUEST_URI']; then breaking up $theurl to get the variable values but using $_SERVER['REQUEST_URI'] just stops the script from running in this case.
Do I have any other options on this?