Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
2153 connectés 

  FORUM HardWare.fr
  Programmation

  php: capter l'url

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

php: capter l'url

n°48547
_naoua
Posté le 24-07-2001 à 13:25:22  profilanswer
 

est il possible de capter l'url ou tout ce qui est après le ?.
je sais que c'est possible en javascript, mais je ne m'en souviens plus...
Merci d'avance

mood
Publicité
Posté le 24-07-2001 à 13:25:22  profilanswer
 

n°48556
FLY LM
Posté le 24-07-2001 à 13:43:27  profilanswer
 

Tu peux essayer cela :
 
 
$url = getenv("HTTP_REFERER" ); ->Récupère l'url
$url_p= parse_url($url); ->la décompose
 
Les composants recherché sont :
"scheme", "host", "port", "user", "pass", "path", "query", et "fragment".
 
si ton url est : http://www.php.net/download-php.php3?csel=br
 
$url[scheme] = http  
$url[host] = www.php.net  
$url[path] = /download-php.php3  
$url[query] = csel=br

n°48561
_naoua
Posté le 24-07-2001 à 13:48:56  profilanswer
 

je te remercie... tu m'enlèves une bonne épine du pied...

n°48563
shinji
Posté le 24-07-2001 à 13:52:38  profilanswer
 

$QUERY_STRING si m'trompe pas

n°48603
_naoua
Posté le 24-07-2001 à 15:44:18  profilanswer
 

merci shinji. çà marche nickel...
ciao


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation

  php: capter l'url

 

Sujets relatifs
Plus de sujets relatifs à : php: capter l'url


Copyright © 1997-2025 Groupe LDLC (Signaler un contenu illicite / Données personnelles)