[PHP] GrabURL

Pagina: 1
Acties:
  • 104 views sinds 30-01-2008
  • Reageer

  • reminder
  • Registratie: Maart 2001
  • Laatst online: 17-08 19:16
ik heb dit stukje code maar ik wil dat dus 2X doen (met verschillende sites allen als ik het dus 2X achter elkaar zet krijg ik :

Warning: fopen("http://www.domein.nl/index.htm", "r") - No error in D:\HTTP\Apache\winamp.php on line 18

Warning: 1 is not a valid File-Handle resource in D:\HTTP\Apache\winamp.php on line 19

Warning: Supplied argument is not a valid File-Handle resource in D:\HTTP\Apache\winamp.php on line 21

dus welke strings moet ik veranderen en welke niet ?
PHP:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?
$GrabURL = "http://www.domein1.nl/index.htm"; 
$GrabStart = "<B>";
$GrabEnd = "</B>";

$file = fopen("$GrabURL", "r");
$rf = fread($file, 20000);
$grab = eregi("$GrabStart(.*)$GrabEnd", $rf, $printing);
fclose($file);
echo $printing[1];

$GrabURL = "http://www.domein2.nl/index.htm"; 
$GrabStart = "<B>";
$GrabEnd = "</B>";

$file = fopen("$GrabURL", "r");
$rf = fread($file, 20000);
$grab = eregi("$GrabStart(.*)$GrabEnd", $rf, $printing);
fclose($file);
echo $printing[1];
?>

Each year, the Rainforest is responsible for over 3000 deaths from accidents, attacks or illnesses. There are over 700 things in the rainforest that cause cancer. Join the fight now and help stop the Rainforest before it's too late


  • mEdnass
  • Registratie: November 2001
  • Laatst online: 04-12-2021
Warning: fopen("http://www.domein.nl/index.htm", "r") - No error in D:\HTTP\Apache\winamp.php on line 18
Dan heb je toch juist geen fout??? ;) of wel? |:(

  • reminder
  • Registratie: Maart 2001
  • Laatst online: 17-08 19:16
Op zaterdag 19 januari 2002 12:22 schreef mEdnass het volgende:

[..]

Dan heb je toch juist geen fout??? ;) of wel? |:(
idd, zou ik ook zeggen maar zoveel verstand heb ik ook weer niet van PHP :)

Each year, the Rainforest is responsible for over 3000 deaths from accidents, attacks or illnesses. There are over 700 things in the rainforest that cause cancer. Join the fight now and help stop the Rainforest before it's too late


Verwijderd

Probeer eens:
PHP:
1
2
3
4
5
<?
..
$file = fopen("$GrabURL", "r") or die("Can not open $GrabURL.");
..
?>

  • vinnux
  • Registratie: Maart 2001
  • Niet online
Die foutmeldingen die je krijgt wil zeggen dat het opgevraagd file/http niet beschikbaar is.

  • reminder
  • Registratie: Maart 2001
  • Laatst online: 17-08 19:16
maar het kan dus wel 2X achter elkaar met de zelfde strings (of hoe dat ook heet in PHP) ?

Each year, the Rainforest is responsible for over 3000 deaths from accidents, attacks or illnesses. There are over 700 things in the rainforest that cause cancer. Join the fight now and help stop the Rainforest before it's too late


  • mEdnass
  • Registratie: November 2001
  • Laatst online: 04-12-2021
yep, het oude wordt gewoon vervangen, zeg maar.

  • reminder
  • Registratie: Maart 2001
  • Laatst online: 17-08 19:16
Oeps mijn fout het kwam omdat de url waar die heen moest met een Paswoord beveiligd is, maar uhm hoe zorg je er voor dat ie die site ook kan openen ? (tis niet z'n java paswoord script maar z'n 1 van de webserver zelf)

edit:
kan dat gewoon met http://user:pass@www.site.nl/index.htm ?? (ik dacht er ook ineens aan)

Each year, the Rainforest is responsible for over 3000 deaths from accidents, attacks or illnesses. There are over 700 things in the rainforest that cause cancer. Join the fight now and help stop the Rainforest before it's too late


  • mEdnass
  • Registratie: November 2001
  • Laatst online: 04-12-2021
Ik denk het te weten, maar ik kan er ook naast zitten, probeer eens: user:passw@www.henk.nl ofzo.

  • reminder
  • Registratie: Maart 2001
  • Laatst online: 17-08 19:16
oeps nog 1 vraag, hoe kan ik z'n " krijgen in een string ? want als ik dat gewoon doe ziet ie het als einde van de string

Each year, the Rainforest is responsible for over 3000 deaths from accidents, attacks or illnesses. There are over 700 things in the rainforest that cause cancer. Join the fight now and help stop the Rainforest before it's too late


  • mEdnass
  • Registratie: November 2001
  • Laatst online: 04-12-2021
suc6 d'r mee!
Maar nog 1 tip: zoek eens op hoe loopjes werken;
Zo kun je dubbele code vaak omzeilen...

  • mEdnass
  • Registratie: November 2001
  • Laatst online: 04-12-2021
probeer \"

  • vinnux
  • Registratie: Maart 2001
  • Niet online
Als je binnen een "" een " of iets speciaals wilt gebruiken dan dit :

"\"" = "
"$a" = wat er in $a staat
"\$a" = $a
"\n" = newline
"\t" = tab

etc etc

  • reminder
  • Registratie: Maart 2001
  • Laatst online: 17-08 19:16
Ik wil dus dat het nummer 504 (in dit geval) er uitgelezen wordt
code:
1
2
3
<HTML><HEAD><META HTTP-EQUIV="Refresh" CONTENT="10; URL=/a?m=l"></HEAD><BODY BGCOLOR="#000000" TEXT="#ffffff" LINK="#8080ff" ALINK="#8080ff" VLINK="#8080ff"><PRE>queue:&nbsp;<B>Gigi D'Agostino - 07 - Tekno Jam</B>
[<a href="/a?m=l&o=j&a=504">j</a>][<a href="/a?m=l&o=d&a=504">d</a>] Gigi D'Agostino - 08 - Coca E Avana
[<a href="/a?m=l&o=j&a=505">j</a>][<a href="/a?m=l&o=d&a=505">d</a>] Gigi D'Agostino - 09 - Bla Bla Bla (Dark Mix)

Each year, the Rainforest is responsible for over 3000 deaths from accidents, attacks or illnesses. There are over 700 things in the rainforest that cause cancer. Join the fight now and help stop the Rainforest before it's too late


  • reminder
  • Registratie: Maart 2001
  • Laatst online: 17-08 19:16
Er is toch vast wel iemand die weet hoe dit moet ?
:'(

Each year, the Rainforest is responsible for over 3000 deaths from accidents, attacks or illnesses. There are over 700 things in the rainforest that cause cancer. Join the fight now and help stop the Rainforest before it's too late

Pagina: 1