I have a php script (listening.php) listening for any in-bound GET
requests.
For now, I only listen for specific GET
variables. All other variables are ignored.
I'm placing a simple pixel-type script on an outside url:
<?php
$url = $_SERVER['SCRIPT_URI'];
?>
<script src="http://mydomain.com/listening.php?page=1&url=<?php echo $url;?>"></script>
This works fine and dandy.
I'd like to pass more info, but I'd like to pass all $_SERVER
variables in the array.
I have a few options, like looping through the array, and building the url string with the key/values.
But, I'm more interested in passing the entire array as a whole, and storing it in mysql, inside a Text column.
I know there's probably a limit of how large a single string can be passed via a url.
Does anyone have a good way or idea on a best practice for doing this? Personally I expect passing an array via the url is not a good idea, but I'm fishing for ideas.