I have created a very simple script to extract some parameters from the url using:
$_SERVER[‘QUERY_STRING’];
I have some values like this link:
http://test.com/r.php?gsgsg&0&1&0&sfs
The values are gsgsg 0 1 0 sfs.
Everything is fine when I use the link on own browser.
But when I press the link on a facebook post. I will only get:
gsgs 0 sfs
It seems like facebook removes my numbers.
I tried printing out the url I’m using to post the message in my app, all the values are there. But when I go in Facebook app and press the link, I am missing 2 int values.
Some one have a hint?
A query string like this:
Is interpreted as:
Just from that you can already imagine that the value of the first
0gets clobbered by the next. Why Facebook misses the1value is unclear, but it’s common sense to apply variable naming rules to query string parameters.I’m not sure what you’re trying to do, but this would be much more reliable:
It generates an array
$_GET['s']of: