$.get("http://localhost/code.php", function(data){
alert(data);
});
code.php:
<?php
echo "hello!";
?>
I also tried other variants with post and ajax, nothing works. I can run php scripts just fine, I can write to a file for example, however they return no data.
I’m running the scripts on a IIS server.
[EDIT]
I forgot to add an important detail, I’m calling the php script from a greasemonkey script. I tried it on the server and it works. But I need this for greasemonkey.
Well, in the end I gave up on greasemonkey since it would not work whatever I tried. So I got scriptish and as luck would have it, the code I needed was just another click away from the addon page. So here it is if anyone else needs it:
It works right away in scriptish, no need to include anything else.