[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 379: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Webmasterplein.net • Toon onderwerp - Map-url
aan alle goede dingen komt een eind, webmasterplein.net 2003 - 2013
wij danken jullie voor al mooie momenten die dankzij dit forum ontstonden - Derk, Rutger en Stef

Map-url

Je komt er niet helemaal uit bij het scripten? Übergoede functie geschreven? Alles met betrekking tot scripting, kun je hier terecht.

Map-url

Berichtdoor frizzy » 26 feb 2008 11:08

frizzy
wmpr
 
Berichten: 4261
Geregistreerd: 20 sep 2006 16:03
Woonplaats: Boskoop :D

Re: Map-url

Berichtdoor ElbertF » 26 feb 2008 11:13

Avatar gebruiker
ElbertF
wmpr
 
Berichten: 1310
Geregistreerd: 14 nov 2007 22:09

Re: Map-url

Berichtdoor libia » 26 feb 2008 12:15

ola, un cerveza por favor.


of
Avatar gebruiker
libia
wmpr
 
Berichten: 4149
Geregistreerd: 23 okt 2005 14:14
Woonplaats: Alphe!!

Re: Map-url

Berichtdoor frizzy » 26 feb 2008 18:27

Ik haal nu met een scriptje alle URL's van een pagina op. Maar soms heb je met links te maken die internet zijn (<a href="index.php">Home</a> bijvoorbeeld). Nu wil ik dus van de URL die hij nu bezoek (de URL is variabel omdat hij de URL's bezoekt die hij gevonden heeft in eerdere pagina's) de map hebben waar hij instaat.

Even een voorbeeld:

Ik zit op de pagina frank/lelijk.html. Nu staat daar een link:
<a href="banaan.html">Home</a>. Ik heb banaan.html daar al uit gesloopt, maar nu wil ik van banaan.html frank/banaan.html maken. Ik heb nu wel iets met explode in elkaar gekloot, maar als de pagina dan is: frank/ doet hij het niet.
frizzy
wmpr
 
Berichten: 4261
Geregistreerd: 20 sep 2006 16:03
Woonplaats: Boskoop :D

Re: Map-url

Berichtdoor libia » 26 feb 2008 20:41

dit wordt heel moeilijk, je moet namelijk de ./ eruit vissen en rekening houden met één of meerdere ../ en en met dead links en met links naar een andere site enzovoort enzovoort ;)
ola, un cerveza por favor.


of
Avatar gebruiker
libia
wmpr
 
Berichten: 4149
Geregistreerd: 23 okt 2005 14:14
Woonplaats: Alphe!!

Re: Map-url

Berichtdoor frizzy » 26 feb 2008 21:11

Nee, echt? Als het makkelijk was ging ik het niet vragen schat. Maja, ik heb al een plan dus dat ga ik morgen uitproberen
frizzy
wmpr
 
Berichten: 4261
Geregistreerd: 20 sep 2006 16:03
Woonplaats: Boskoop :D

Re: Map-url

Berichtdoor Remi » 26 feb 2008 21:22

Avatar gebruiker
Remi
wmpr
 
Berichten: 3010
Geregistreerd: 04 apr 2006 15:22

Re: Map-url

Berichtdoor Derk » 26 feb 2008 21:27

Is goed te doen middels explode oid. Heb een keer zoiets gemaakt kan ik me herinneren. Die kon inderdaad met ../ en dergelijke omgaan.
Afbeelding
Avatar gebruiker
Derk
Beheerder
Beheerder
 
Berichten: 12634
Geregistreerd: 27 nov 2003 19:50
Woonplaats: Houten

Re: Map-url

Berichtdoor libia » 26 feb 2008 21:29

volgensmij moet je voor die ../ helemaal in de mapstructuur gaan zoeken, weet eigenlijk niet eens of dit wel mogelijk is :P
ola, un cerveza por favor.


of
Avatar gebruiker
libia
wmpr
 
Berichten: 4149
Geregistreerd: 23 okt 2005 14:14
Woonplaats: Alphe!!

Re: Map-url

Berichtdoor Derk » 26 feb 2008 21:33

Je zit op de volgende site:

http://www.vedelaar.nl/map1/map2/map3/map4/
of:
http://www.vedelaar.nl/map1/map2/map3/map4

Maakt niet uit. Nu explode je op /
Nu heb je een array, met aan het begin rommel. Je had eerst http:// eraf kunnen halen. Je kan ook [0] en [1] unsetten. Vervolgens kijk je of de laatste leeg is. zo ja, dan haal je die er ook af (voor geval eerste URL.

Nu moet je er achter komen of de laatste file een map of een file is. Een heel vieze oplossing is kijken of er een . in staat, en of het laatste eind 3 of 4 karakters heeft.

Dan explode je de volgende URL:
../../../../mapnaam/mapnaam/bestand.htm
die explode je op /

foreach door de laatste array.
Iedere keer bij .. doe je de laatste uit de eerste URL unsetten. Houd je niks meer over? alleen het laatst overgebleven vakje behouden. Dan doe je al het andere erachter plempen.

Moet te doen zijn zou ik zo zeggen.
Afbeelding
Avatar gebruiker
Derk
Beheerder
Beheerder
 
Berichten: 12634
Geregistreerd: 27 nov 2003 19:50
Woonplaats: Houten

Re: Map-url

Berichtdoor frizzy » 27 feb 2008 07:57

frizzy
wmpr
 
Berichten: 4261
Geregistreerd: 20 sep 2006 16:03
Woonplaats: Boskoop :D


Keer terug naar PHP, ASP, SQL



cron