View Single Post
Old 06-06-2012, 06:47 PM   PM User | #4
dan-dan
Regular Coder

 
dan-dan's Avatar
 
Join Date: Aug 2009
Location: England
Posts: 483
Thanks: 22
Thanked 79 Times in 78 Posts
dan-dan is on a distinguished road
PHP Code:
<?php
$_GET
['url'] = "http://www.codingforums.com"// Test URL 
$url = isset ($_GET['url']) ? strtolower($_GET['url']) : "someDefaultPage.php";

$file file($url);
$file implode(""$file);

if (
preg_match("/<title>(.+)<\/title>/i"$file$m))
   
$title $m[1];
else
   
$title "someDefaultTitle";
?>

<html>
<head>
   <title><?php echo $title?></title>

<style type="text/css">
iframe {
   width: 100%;
   height: 100%;
   border: none;
   scroll: auto;
}
</style>   
</head>

<body>
   <iframe src="<?php echo $url?>"></iframe>
</body>

</html>
dan-dan is offline   Reply With Quote