Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Seeking applications ...
Author Message
pimpoff
New Member
New Member



Joined: Sep 25, 2003
Posts: 21

PostPosted: Thu Sep 25, 2003 8:59 pm Reply with quote

Hello, I was wondering how to make this module, im not really sure I tried to duplicate the form it uses but when I type a site it doesn't do much.

If i get that working it shouldn't be hard im trying to add to the modules a link that will open part of my homepage within the nuke, not sure best way to do it.
 
View user's profile Send private message
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Thu Sep 25, 2003 9:03 pm Reply with quote

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
 
View user's profile Send private message
pimpoff







PostPosted: Thu Sep 25, 2003 9:14 pm Reply with quote

Thx Raven that works, but one question lets say I want to use that to display a web directory within the nuke. But when I go to that url it trys looses the dir name and uses the nuke one.. kind of unlear umm
Like lets say the nuke is in webroot/main
and the dir with pics and files is webroot/files
If I go to the url and try to view any images it trys to open them like
webroot/main/file
rather then webroot/files/file

I probably don't need the fetch feature for this. Sorry if im unclear.
 
Raven







PostPosted: Thu Sep 25, 2003 9:26 pm Reply with quote

The purpose of this was to demonstrate for people that have static web pages that they now want to display on their nuked site. But more so, this method allows you to retrieve the html and NOT display it. You can then parse it looking for key pieces, extract them, and then display the key pieces the way you want to.

To your point, it depneds on how the urls are built. Whether fully qualified or relative, if I remember right.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Seeking applications ...

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©