Php网络浏览器

时间:2016-11-17 11:41:21

标签: php html

我有这个代码应该使用服务器来定位网址并在页面上显示它。这是我拥有的最好的代码,它不起作用。我需要它使用服务器获取网站并在页面上显示它。还有其他支持文件,当您点击该新网站上的链接时,继续使用您的网站。

我如何才能让这些代码完成我需要的工作? 是否有一种替代方案,我可以使用服务器端而不是客户端来创建网页?

Full file

的index.php

<form action="main.php" method="post" name="URI" id="URI">
Enter URL you want the to browse:<br>
<input type="text" name="URI" size="40">
<input type="submit" value="Go!">
</form>

frameset.php

<?php
if (!isset($HTTP_POST_VARS['URI']) || !$HTTP_POST_VARS['URI']){
    header("Location: index.html");
    die;
}
$uri = urlencode($HTTP_POST_VARS['URI']);

$frameset = ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
<title></title>
</head>
<!-- frames -->
<frameset  rows="8%,*">
    <frame name="php_browser_location" src="location.html" marginwidth="10" marginheight="10" scrolling="no" frameborder="1" noresize>
    <frame name="php_browser_main" src="main.php?php_browser_uri=$uri" marginwidth="10" marginheight="10" scrolling="auto" frameborder="0">
</frameset>

</html>

<?php ;
echo $frameset;

?>

0 个答案:

没有答案