Your remote php.ini
has magic quotes enabled.
You can check by running...
var_dump(get_magic_quotes_gpc()); // True means it is enabled
It will escape all the GET, POST & COOKIE super globals automatically - but then escaping again will leave you with a slash that will be inserted.
Disable magic quotes on your server, or use a magic quotes disabler functions if disabling them in impossible.
Update
For the hell of it, here is one I just made up
if (get_magic_quotes_gpc()) {
function stripSlashesRecursive($array) {
$stripped = array();
foreach($array as $key => $member) {
if (is_array($member)) {
$stripped[stripslashes($key)] = stripSlashesRecursive($member);
} else {
$stripped[stripslashes($key)] = stripslashes($member);
}
}
return $stripped;
}
$globals = array('_GET', '_POST', '_COOKIE', '_REQUEST');
foreach($globals as $global) {
$$global = stripSlashesRecursive($$global);
}
}
It works!