Page 1 sur 1

comment récuper l'url d'un hypertext en PHP

Posté : 30 nov. 2008, 22:06
par anouar1985
Bonjour svp j'ai besoin de récuperé l'url d'un hypertext mais je ne sais pas comment.
j'utilise la fonction pour trouver cet hypertext
print_r($matches[0][380])
donc ce qui m'affiche l'hypertext suivant :
TRES BELLE AFFAIRE
mais moi j'ai besoin de son url par exemple:
http://www.phppost.net/php-langage/tran ... 50543.html

est ce qu'il existe une fonction en PHP qui permet d'avoir ce url dans une variable?
Merci[/url]

Posté : 01 déc. 2008, 08:40
par Patriboom
Avec la variable $_SERVER tu devrais trouver ce que tu cherches:
http://ca.php.net/manual/fr/reserved.va ... server.php