PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.lang.php > Getting base URL and parameters from a URL
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Getting base URL and parameters from a URL

Réponse
 
LinkBack Outils de la discussion
Vieux 14/02/2008, 03h36   #1
Aaron Gray
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Getting base URL and parameters from a URL

Hi,

I am wanting to disect the $_SERVER['HTTP_REFERER'] URL into a base URL and
its parameters. So I can do $_POST processing where appropriate.

Is there a builtin function or functions that will do this for me ?

Many thanks in advance,

Aaron


  Réponse avec citation
Vieux 14/02/2008, 03h39   #2
ZeldorBlat
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Getting base URL and parameters from a URL

On Feb 13, 10:36 pm, "Aaron Gray" <ang.use...@gmail.com> wrote:
> Hi,
>
> I am wanting to disect the $_SERVER['HTTP_REFERER'] URL into a base URL and
> its parameters. So I can do $_POST processing where appropriate.
>
> Is there a builtin function or functions that will do this for me ?
>
> Many thanks in advance,
>
> Aaron


<http://www.php.net/parse_url>
  Réponse avec citation
Vieux 14/02/2008, 03h47   #3
Aaron Gray
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Getting base URL and parameters from a URL

"ZeldorBlat" <zeldorblat@gmail.com> wrote in message
news:3b277603-926d-4d60-9932-9c99dfb39141@s12g2000prg.googlegroups.com...
> On Feb 13, 10:36 pm, "Aaron Gray" <ang.use...@gmail.com> wrote:
>> Hi,
>>
>> I am wanting to disect the $_SERVER['HTTP_REFERER'] URL into a base URL
>> and
>> its parameters. So I can do $_POST processing where appropriate.
>>
>> Is there a builtin function or functions that will do this for me ?
>>
>> Many thanks in advance,
>>
>> Aaron

>
> <http://www.php.net/parse_url>


Thanks, that was quick

So it looks like the 'query' part is a string. Is there anything that parses
this into an associative array ?

Thanks,

Aaron


  Réponse avec citation
Vieux 14/02/2008, 03h52   #4
Aaron Gray
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Getting base URL and parameters from a URL

"Aaron Gray" <ang.usenet@gmail.com> wrote in message
news:61hrv2F1upaerU1@mid.individual.net...
> "ZeldorBlat" <zeldorblat@gmail.com> wrote in message
> news:3b277603-926d-4d60-9932-9c99dfb39141@s12g2000prg.googlegroups.com...
>> On Feb 13, 10:36 pm, "Aaron Gray" <ang.use...@gmail.com> wrote:
>>> Hi,
>>>
>>> I am wanting to disect the $_SERVER['HTTP_REFERER'] URL into a base URL
>>> and
>>> its parameters. So I can do $_POST processing where appropriate.
>>>
>>> Is there a builtin function or functions that will do this for me ?
>>>
>>> Many thanks in advance,
>>>
>>> Aaron

>>
>> <http://www.php.net/parse_url>

>
> Thanks, that was quick
>
> So it looks like the 'query' part is a string. Is there anything that
> parses this into an associative array ?


Ah 'parse_str()' does the job

Thanks,

Aaron



  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 07h41.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,09398 seconds with 12 queries