I'm trying to get a use php in an html box, but it isn't working. Here's what i'm putting in: (there's some javascript too)
<?php
header('content-type: application/json; charset=utf-8');
$data = json_encode($_SERVER['REMOTE_ADDR']);
echo $_GET['callback'] . '(' . $data . ');';
?>
<script>
var myip="<?php echo $data ?>"
alert(myip)
</script>
And here's what's appearing on the website:
<?php header('content-type: application/json; charset=utf-8');
$data = json_encode($_SERVER['REMOTE_ADDR']);
echo $_GET['callback'] . '(' . $data . ');'; ?>
Well, that and an alert box that says:
<?php echo $data ?>