I run this in localhost and it works. In the server the PHP script returns empty string.
The PHP file containing the script:
<body>
<table>
<tr>
<td>
<?php
function repstr($str) {
return str_replace("x", "y", $str);
}
echo stripslashes(urldecode(repstr($_REQUEST["par"])));
?>
</td>
</tr>
</table>
</body>
Called URL in localhost:
https://localhost/myscript.php?par=x123
on the server:
https://domain.com/myscript.php?par=x123
Both return HTML. But localhost has expected content in td element, server td has no content.
What could it be?
Edit: I currently don’t have access to the PHP file in the server.
There was a configuration diffence between my localhost and the server. The GET parameter is very long and the server didn’t accept it.