| Code: |
<?php
if (!eregi("modules.php", $PHP_SELF)) die ("You can't access this file directly...");
require_once("mainfile.php");
$pagetitle = "- RavensURLFetcher";
include("header.php");
OpenTable();
?>
I have had many requests to help people that simply want to pull html code into their news or content pages. This is to demonstrate how easy it is. Just type the url of the page you'd like to see in your web page. Then click Fetch. It should be displayed in this module window. For example, type yahoo.com and click Fetch.<br /><br />
<form method=post>
<input name='geturl' size='30' value='http://'>
<br /><br />
<input type='submit' value='Fetch' name='submit'>
</form>
<?
if ($_POST['submit']=='Fetch') {
$url = addslashes(strip_tags($_POST['geturl']));
if (substr($url,0,7)!='http://') {
die('URL must begin with http://');
CloseTable();
include("footer.php");
}
echo file_get_contents($url);
}
CloseTable();
include("footer.php");
?>
|
Save this modules/YOUR_MODULE/index.php