Author |
Message |
blith
Client

Joined: Jul 18, 2003
Posts: 977
|
Posted:
Thu Oct 16, 2003 8:18 am |
|
And is it a major concern to worry about? Also Raven, I was wondering if the Fetch it mod you have here is available? Thanks. |
|
|
|
 |
Frogger
Worker


Joined: Oct 06, 2003
Posts: 108
|
Posted:
Thu Oct 16, 2003 8:32 am |
|
I have the fetchit mod, but it won't work....waaaa.
The security code doesn't show up, and I have checked and rechecked the configurations and everything is o.k.
Took it off thinking it was a problem with the script. (didn't download it from you, Raven) Will try yours and see if the problem persists. |
_________________ Only registered users can see links on this board! Get registered or login! |
|
 |
 |
Raven
Site Admin/Owner

Joined: Aug 27, 2002
Posts: 17088
|
Posted:
Thu Oct 16, 2003 8:40 am |
|
I think we're talking about 2 different mods here . Mine is just a quick throw together to show how easy it is. It isn't in a download. I thought I posted it but I will look again. |
|
|
|
 |
Raven

|
Posted:
Thu Oct 16, 2003 8:59 am |
|
Here is the code for the little diddy I posted here. The key is the file_get_contents() function.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");
?>
|
Now you could do this
$urlContents = file_get_contents($url);
Then, you can edit that string to only extract the pieces you need  |
|
|
|
 |
blith

|
Posted:
Thu Oct 16, 2003 10:29 am |
|
Sorry Raven. I wasn't clear about what I was asking. When I go to your dls you have protection against harvesters using a security code. The button is labled "fetch it" so that is what I called it. Do you have that block here available for dl? I have a download protector like it but it doesn't work so I was asking for yours... thanks for taking the time |
|
|
|
 |
Raven

|
Posted:
Thu Oct 16, 2003 10:35 am |
|
Aha! I actually d/l that from http://www.2thextreme.org/ and it seems I had to tweak it a little. Give that a try and see if it works for you as it is. |
|
|
|
 |
blith

|
Posted:
Thu Oct 16, 2003 1:53 pm |
|
Okay I grabbed that one and I am having trouble with the graohics showing up. Do you have any advice concerning how you did it? Thanks |
|
|
|
 |
Raven

|
Posted:
Thu Oct 16, 2003 2:04 pm |
|
Yes, I had that problem too. Rather than spend time with GD, I opted to not use the dynamic graphic and did a quick hack. In the getit() function in the index.php file, find this codeCode: $makepass = makePass();
$code = $makepass;
$result = sql_query("select lid, title, url from ".$prefix."_downloads_downloads where lid=$lid", $dbi);
list($lid, $title, $url) = sql_fetch_row($result, $dbi);
$fetchid = base64_encode($url);
$transfertitle = str_replace (" ", "_", $title);
include("header.php");
|
Now right after it is an 'if' statement and I don't remember what it said, but I modified it to
That way it never executes and it always draws the graphic using the theme font. So, the code will look like thisCode: $makepass = makePass();
$code = $makepass;
$result = sql_query("select lid, title, url from ".$prefix."_downloads_downloads where lid=$lid", $dbi);
list($lid, $title, $url) = sql_fetch_row($result, $dbi);
$fetchid = base64_encode($url);
$transfertitle = str_replace (" ", "_", $title);
include("header.php");
if (0) {
|
There is a giveaway by doing that. Certain programs could harvest it still if they got sophisticated enough. If they want it that bad, oh well. |
|
|
|
 |
blith

|
Posted:
Thu Oct 16, 2003 2:05 pm |
|
Thank you Raven!! as always the wonderful php Guru!!! How do you do it? |
|
|
|
 |
Raven

|
Posted:
Thu Oct 16, 2003 2:14 pm |
|
"Talent on loan from God" . I really like Rush's expression. Even though he may not truly realize how right he is with that statement, Anything we are or anything we posess is only because we have been trusted with it, i.e. talent or whatever. What we do with it is more important than what we gain from it. Okay, I'll lighten up  |
|
|
|
 |
blith

|
Posted:
Thu Oct 16, 2003 2:19 pm |
|
Actually I am very familiar with Rush and I have used that as well!
"What we are is God's gift to us and what we do with ourselves is our gift to God" |
|
|
|
 |
|