I need to use the output in the variable $data and put it inside an iframe (or other perhaps) so as to scroll it properly. Please, find the mistake in the following code:
<?php
$url = 'http://lema.rae.es/drae/srv/search?id=IwxflJmT9DXX2DMkYs8Z';
$css = <<<EOT
<style type="text/css">
body
{
background: #eeeeee;
}
.a
{
color: green;
}
.f
{
font-size: 200%;
}
.o
{
font-size: 80%;
}
img
{
visibility:hidden;
}
</style>
EOT;
$data = file_get_contents($url);
$data = str_replace('</head>', $css.'</head>', $data);
echo "<iframe id='first' src='$data'
frameborder='0'
width='400px'
height='300px'
scrolling='yes'
border-style: none;></iframe>";
?>
The problem is probably on the last lines. Instead of the word's definition to appear inside the iframe, an error shows up, saying the object hasn't been found Thanks!

