I am sending a PHP image through email that uses parameters to determine the image to display. This image displays in every email client except Gmail. The reason for this is due to the Google User Content Proxy, which wraps around the link and shows the php file while ignoring the parameters attached to it.
I seem to have the same problem as this question,
Problems with tracking pixels and Gmail proxy. Their solution was the following:
I resolved it using https://www.example.com/tracking.php/order_id=1
instead and then on the tracking.php I didn't use $_GET but
$_SERVER['REQUEST_URI'] and parsed the /order_id= String.
test.php?par=1 is a script named
test.php with a query string key of
par and value
If you do not have pathinfo enabled, then
test.php/par=1 is a DIRECTORY name
test.php, and a non-existent file in that directory named
Note that PHP won't parse pathinfo data into $_GET. Only actual
?key=val-type query values are processed for that. You'll have to dig out
$_SERVER['PATH_INFO'] and parse it yourself.