i have altered a script and id like to include it in2 another script.the problem im having is that it uses "variables"(dont no the proper name) after the .php
IE:
the file i want included is called server1.php but with the variables its server1.php?beaconport=8778&ip=217.153.83.126
the variables tell the script which game server to query.
thx for any help guys.
$beaconport=8778; $ip="217.153.83.126"; include("server1.php");
That'd be using the $_GET superglobal array.
If you have a URL such as server1.php?beaconport=8778&ip=217.153.83.126
You can access the variables using the $_GET array.
$GET['beaconport'] contains 8778 $GET['ip'] contains 217.153.83.126
As etully showed, you can simply set the variables before include()'ing the script, and then alter that script so that it checks to see if those variables are already defined or not. Example:
if(!isset($beaconport) && isset($_GET['beaconport'])) $beaconport = $_GET['beaconport']; // etc. for other variables
thans guys.it solved that problem now its showed up others