Pagina zoeker

Gestart doorFrankm12 reacties155 weergaven

13 berichten · pagina 1 van 1

Frankm

Lid · Topicstarter

Berichten
137
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ik wil dat dit script een bepaald onderdeel tussen 2 stukken uit een pagina haalt.

[COLOR= #0000BB]<?php
$url[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/file_get_contents"]file_get_contents[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"http://www.jesite.ext"[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$begin[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"Blaat1"[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$einde[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"Blaat2"[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$resultaat[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]//Hier moet het gebeuren ik denk met eregi()[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$resultaat[/COLOR][COLOR= #007700];[/COLOR]
?>
0
Berichten
2.950
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?php
$start[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/explode"]explode[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$begin[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$url[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$resultaat[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/explode"]explode[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$einde[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$start[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]]);[/COLOR]


Maarja, als jij het stukje hebt:

Quote:
Hallo dit gaat over Blaat1

Het is eigenlijk allemaal heel vaag dat Blaat1, niet te verwarren met blaat2. Blablablabla
Jajajaja, gacasdceacdscacdascd
ascd
acsd
acsd
blaat2

Dan krijg je het stukje "Het is eigenlijk allemaal heel vaag dat " (geloof ik hypocrite)
0
Berichten
209
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ruben schreef:
[COLOR= #0000BB]<?php
$start[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/explode"]explode[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$begin[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$url[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$resultaat[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/explode"]explode[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$einde[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$start[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]]);[/COLOR]
Maarja, als jij het stukje hebt:

Quote:
Hallo dit gaat over Blaat1

Het is eigenlijk allemaal heel vaag dat Blaat1, niet te verwarren met blaat2. Blablablabla
Jajajaja, gacasdceacdscacdascd
ascd
acsd
acsd
blaat2

Dan krijg je het stukje "Het is eigenlijk allemaal heel vaag dat " (geloof ik hypocrite)

Ja klopt winkJe hakt het in stukjes bij elke blaat1, en vanaf dan zoek je alleen nog in het tweede stuk (dus vanaf de eerste blaat1).
0
Berichten
13.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
of je doet:

[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #007700]function[/COLOR] split_right[COLOR= #007700]([/COLOR][COLOR= #0000BB]$pattern[/COLOR][COLOR= #007700],[/COLOR][COLOR= #0000BB]$input[/COLOR][COLOR= #007700],[/COLOR][COLOR= #0000BB]$len[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700])
    {[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$len[/COLOR][COLOR= #007700]==[/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700])[/COLOR]
    [URL="http://www.php.net/return"]return[/URL] [URL="http://www.php.net/split"]split[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$pattern[/COLOR][COLOR= #007700],[/COLOR][COLOR= #0000BB]$input[/COLOR][COLOR= #007700]);[/COLOR]

            [COLOR= #0000BB]$tempInput[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/split"]split[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$pattern[/COLOR][COLOR= #007700],[/COLOR][COLOR= #0000BB]$input[/COLOR][COLOR= #007700]);[/COLOR]
            [COLOR= #0000BB]$tempInput[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/array_reverse"]array_reverse[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$tempInput[/COLOR][COLOR= #007700]);[/COLOR]
            [COLOR= #0000BB]$tempArray[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/array"]array[/URL][COLOR= #007700]();[/COLOR]
            [COLOR= #0000BB]$ArrayIndex[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700];[/COLOR]
            [COLOR= #0000BB]$indexCount[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700];[/COLOR]
            [URL="http://www.php.net/foreach"]foreach[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$tempInput[/COLOR] [COLOR= #007700]as[/COLOR] [COLOR= #0000BB]$values[/COLOR][COLOR= #007700])
            {[/COLOR]
                [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$indexCount[/COLOR][COLOR= #007700]<[/COLOR][COLOR= #0000BB]$len[/COLOR][COLOR= #007700])
                {[/COLOR]
                    [COLOR= #0000BB]$tempArray[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]$ArrayIndex[/COLOR][COLOR= #007700]]=[/COLOR][COLOR= #0000BB]$values[/COLOR][COLOR= #007700];[/COLOR]
                    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$indexCount[/COLOR][COLOR= #007700]<[/COLOR][COLOR= #0000BB]$len[/COLOR][COLOR= #007700]-[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700])[/COLOR]
                        [COLOR= #0000BB]$ArrayIndex[/COLOR][COLOR= #007700]++;
                }[/COLOR]
                [URL="http://www.php.net/else"]else[/URL]
                [COLOR= #007700]{[/COLOR]
                        [COLOR= #0000BB]$tempArray[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]$ArrayIndex[/COLOR][COLOR= #007700]]=[/COLOR][COLOR= #0000BB]$values[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$pattern[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$tempArray[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]$ArrayIndex[/COLOR][COLOR= #007700]];
                   
                }[/COLOR]
               
                [COLOR= #0000BB]$indexCount[/COLOR][COLOR= #007700]++;

            }[/COLOR]
            [URL="http://www.php.net/return"]return[/URL] [URL="http://www.php.net/array_reverse"]array_reverse[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$tempArray[/COLOR][COLOR= #007700]);
    }[/COLOR]

[COLOR= #0000BB]$start[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/split"]split[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$begin[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$url[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]2[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$midden[/COLOR] [COLOR= #007700]=[/COLOR] split_right[COLOR= #007700]([/COLOR][COLOR= #0000BB]$einde[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$start[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]],[/COLOR] [COLOR= #0000BB]2[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$resultaat[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$midden[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700]];[/COLOR]
?>


dan doet hij alles wat na blaat1 komt
en alles wat voor blaat2 komt

maar dan heb je wel een stukje extra code....
0
Berichten
35.796
Reputatie
1
Punten
0,00
Lid sinds
Laatst gezien
En precies hetzelfde kun je volgens mij ook doen met iets als
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [URL="http://www.php.net/substr"]substr[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$tekst[/COLOR][COLOR= #007700],[/COLOR] [URL="http://www.php.net/strpos"]strpos[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$tekst[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]Blaat1[/COLOR][COLOR= #007700]),[/COLOR] [URL="http://www.php.net/strpos"]strpos[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$tekst[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]Blaat2[/COLOR][COLOR= #007700]) -[/COLOR] [URL="http://www.php.net/strpos"]strpos[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$tekst[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]Blaat1[/COLOR][COLOR= #007700]));[/COLOR]
?>
0
Frankm

Lid · Topicstarter

Berichten
137
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Bedankt sjerdo die van jou werkt tip top.
Die van ruben kreeg ik niet aan de praat en Lennard was de derde.
Edit: (bijna Jezus) zijn naam juist aangepast
0
Berichten
2.950
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ik zou die van Lennard dan gebruiken als ik jou was
0
Berichten
35.796
Reputatie
1
Punten
0,00
Lid sinds
Laatst gezien
.. en noem me nooit meer lannardcry
0
Frankm

Lid · Topicstarter

Berichten
137
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Lennard schreef:
.. en noem me nooit meer lannardcry
Ow sorry zit nu op pc van mijn moeke en is querty Belgen houden van Azerty
0
Berichten
1.712
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Slechte smoes, de E zit daar op dezelfde plek emo
0
Berichten
2.950
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
emo!!!!
0
Frankm

Lid · Topicstarter

Berichten
137
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Pascal schreef:
Slechte smoes, de E zit daar op dezelfde plek emo
Als je normaal blind typt en nu moet kijken verwar je je snel! Maarja denk ervan wat je wilt.
0
Berichten
2.950
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Dit gaat nergens meer over, slotje
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren