5.jnetu/edseart/ma![endif]--t//mabionse-url.php" hreflang="fr"> navbar navbar-fixed-top-widthdiv clasd> navbar-inner cl/atfix-widtdthase-url./" clasd> branm+xPHP"48/fueightit24" nct2.phtthidl.mainmenu-toggle-widtdthul clasd> nav-widtdt -url clasd> th aaltveth thGtioInvolk r thHelp navbar-xml" hreidl.topxml" hreaalterl./sl="alt/manual dtdthinpur.php?t=hidd.neitial-sk rw" valul-squick-urnual dtdthinpur.php?t=xml" hretial-spattion" clasd> xml" hphp.ne" placeho://r="Sml" hreaap.nekey> x-widtdth/formwidth/divwidthdiv idl.ss"sh-messag/th pnav idl.trickth Introdualter A s L" huag/licference Bioic syntox Thp?s Variabl?s Cx.sta.ps Exn.hssters Operators Cx.trol Strualures Clasdes anm Objecps Nialspaces Errors Exceptters Generators icferences Exnlain"/ Predefin"/ Variabl?s Predefin"/ Exceptters Predefin"/ Interfaces anm Clasdes Cx.t"httoptters anm ateialters Sup=1.0"/ Protocols anm Wrappers Security Introdualter General> sideratters Install"/ as CGI birary Install"/ as an Ap.net module Shsster Security Fil?system Security Databion Security Errorlic=1.0ing Using Register Globals User Submit0"/ Data Magic Quot?s Hidingppli KeepingpCurrent Fealures HTTP authentatom" t lethppli Cxokies Shssters DealingplethpXForms Hanmlingpfil? uploads Using remot?pfil?s Cx.nealter hanmling Persistent Databion Cx.nealters Safe Mr2. Cxmmanm line usag/ Garbag/lColl"alter DTrace Dytiaic Tracing Audio Formatsf="hipulalter Authentatom" t Serkices Cxmmanm Line Specific Extensters Cxmn.hsster anm Archive Extensters Credit Card Prop.neing Cryptography Extensters Databion Extensters Date anm Tim/liclal"/ Extensters Fil? System iclal"/ Extensters Hu < L" huag/lanm Chteicter EncodingpSup=1.0 Imag/ Prop.neinglanm Generatter Mail iclal"/ Extensters Mathematatol Extensters Ner-T"httMIME Outpu0 Prhp.ne Cx.trol Extensters Other Bioic Extensters Other Serkices Shrk r Specific Extensters Shsster Extensters T"http:op.neing Variabl? anm Thp? iclal"/ Extensters Web Serkices Wl.powe Only Extensters XMLf="hipulalter GUI Extensters pdiv idl.goto"widtdthdiv clasd> xml" hnual dtdttdthdiv clasd> phxtth .hsultnetuung cl/atfix-widtdthdiv idl.breadcrumbs-innernual dtdttdtthdiv clasd> nhxtthal dtdttd n.htthal dtdttdManuelppliAut.hs extensters bioihp.sURLsFo"alters URL cl/atfix-widt pag/-tools"widtdthdiv clasd> chang/-l" huag/nual dtdthform aalterl./ document.chang/l" h.submit()retial-spag/n.idl.chang/l" h-l" hs"widtdttttttttt xml"aled">French edit//fhrhal dtdt?/phjecp=pli&per = rel="alternate" href="htthEditrc=1.0cache/fh_php?tDocumentom" t+/phbl?m& ic=1.0 a Bug .hfentryet/madiv clasd> .hftialdiv-widthh1 clasd> .hftial">t icon" h k rinfo"w(appl4,ppli 5,ppli 7)

hp clasd> .hfpurpos/th .hftial">t icon" h dc-="can">Analyon une URL et retourne des mnosa.ps

//ma/divwiidadiv clasd> .hfseal1 ovedsearch.n.idl..hfseal1-s="alternate" href-ovedsearch.nwidthh3 clasd> p"can">Dvedsearch. methodsynopsis dc-ovedsearch.nwidt php?th php? mixed">mixed methodtial">t icon" hidtdt( methodateiath php?thstring paeialter">$" hidtd[, methodateiath php?thint paeialter">$ mnonent Manual izer"> = -1idt] ) paei rdfs- mmhp"-widt Cett?pfo"alter analyon une URL et retourne un tabl?au asdociom"f> idthp clasd> paei-widt Cett?pfo"alter n'est emphiois">t s s="alter">t icon" h() feei 2. son mieux pour les analyonr> rrealement.idth/p>idh/divwiiidadiv clasd> .hfseal1 ateialtersn.idl..hfseal1-s="alternate" href-ateialtersnwidthh3 clasd> p"can">Liste 2. ateiaètres paei-widt "dng=idtdtidtdtd paeialter">" h paei-widt L'URL à analyonr. Les cteictè.hs invalides sont remplacés ate idt des cteictè.hs soulignés _ paeialter"> mnonent paei-widt Peut être une des cx.sta.pes atemi ,idt , ,idt , ,idt , idt ou pour récupérnr>unihp.mentidt une partie 2. l'URL en tant qu/ chaîne de cteictè.hs (sauf lorsqu/idt est fourni ; dans ce cts, l" valeur retournéeidt seei un rl">">entaeridh/divwiiidadiv clasd> .hfseal1 returnvalulsn.idl..hfseal1-s="alternate" href-returnvalulsnwidthh3 clasd> p"can">Valeurs de retour paei-widt Pour les URL vraiment malpformées, s="alter">t icon" h() peut retourner .idth/p>idthp clasd> paei-widt Si le ateiaètre paeialter"> mnonent est omis, un php?th php? array">arrayidt asdociom"f>est retourné. Au moins un élémhp" seei préshp" dans le tabl?au. Voiciidt les clés aotentaelles 2. ce tabl?au:
    itemizedlist"widtdthrl clasd> listitem-widt s kartial"> kartial">scheme - e.g. ttp:idt idtdt listitem-widt s kartial"> kartial">hostidt idtdt listitem-widt s kartial"> kartial">=1.0idt idtdt listitem-widt s kartial"> kartial">useridt idtdt listitem-widt s kartial"> kartial">t ssidt idtdt listitem-widt s kartial"> kartial">t thidt idtdt listitem-widt s kartial"> kartial">hp.ne - après le poin" d'interrogom" t "?idtdt listitem-widt s kartial"> kartial">fragment - après le croisill t (dièse) "#idtdtidthp clasd> paei-widt Si le ateiaètre paeialter"> mnonent est spécifié, s="alter">t icon" h()idt retourne une php?th php? stringthstring (ou un rl">">entaer)au lieu d'un php?th php? array">array. Si le mnosentidt demanmé n'existe pts dans l'URL, seei retourné.idth/p>idh/divwiiidadiv clasd> .hfseal1 chang/logn.idl..hfseal1-s="alternate" href-chang/lognwidthh3 clasd> p"can">Historihp. paei-widt "tabl? clasd> doctabl? informaltabl?-widt idt idt Versih.idt Dvedsearch.idt tbody"rtdt idt 5.4.7idt idt C rreal" t 2. la re naissance de l' emphiois">hôte emphiois">schémaidt idt 5.3.3idt idt Sup=.hsster du émis lorsqu/ l'URLidt était invalide.idt idt idt 5.1.2idt Ajout du ateiaètre paeialter"> mnonentidt idh/divwiiidadiv clasd> .hfseal1 exa p"can">Exe paei-widt "div clasd> exaExe s="alter">t icon" h() exa > pdiv clasd> phpfr2."> pspan .net/ndexlor: #0000BB"><?php
    $" h 
    'php" hrusertial:t ssword@hosttial:9090/t th?arg=valul#anchor';

    kar_dump(t icon" h($" h));
    kar_dump(t icon" h($" hort_URL_SCHEME));
    kar_dump(t icon" h($" hort_URL_USER));
    kar_dump(t icon" h($" hort_URL_PASS));
    kar_dump(t icon" h($" hort_URL_HOST));
    kar_dump(t icon" h($" hort_URL_PORT));
    kar_dump(t icon" h($" hort_URL_PATH));
    kar_dump(t icon" h($" hort_URL_QUERY));
    kar_dump(t icon" h($" hort_URL_FRAGMENT));
    ?>
    exa >hp>L'exeh/divwidttthdiv clasd> exa .cre.net/pdiv clasd> cdata >hpr?g=array(8) {idt["scheme"]=>idtstring(4) "php""idt["host"]=>idtstring(8) "posttial"idt["=1.0"]=>idtint(9090)idt["user"]=>idtstring(8) "usertial"idt["=asd"]=>idtstring(8) "t ssword"idt["=ath"]=>idtstring(5) "/=ath"idt["hp.ne"]=>idtstring(9) "arg=valul"idt["fragment"]=>idtstring(6) "anchor"i} string(4) "php""istring(8) "usertial"istring(8) "t ssword"istring(8) "posttial"iint(9090)istring(5) "/=ath"istring(9) "arg=valul"istring(6) "anchor"iidthp clasd> paei-widt "div clasd> exaExe s="alter">t icon" h()
    sans schéma exa > pdiv clasd> phpfr2."> pspan .net/ndexlor: #0000BB"><?php
    $" h 'eta chexa;

    // Avant pli 5.4.7, le chemin seei "eta chexakar_dump(t icon" h($" h));
    ?>
    exa >hp>L'exeh/divwidttthdiv clasd> exa .cre.net/pdiv clasd> cdata >hpr?g=array(3) {idt["host"]=>idtstring(15) "a chexaidh/divwiiidadiv clasd> .hfseal1 not?sn.idl..hfseal1-s="alternate" href-not?snwidthh3 clasd> p"can">Not?s not? >hp> not? >Not?: idt

    paei-widt Cett?pfo"alter n?pfo"alterne pts avec les URLs idth/p>h/blockquot?widthblockquot? clasd> not? >hp> not? >Not?: idt

    paei-widt s="alter">t icon" h() a été créée tout spécial?ment pour analyonr>les URLidt et non>les URI. Cependant, pour des raisers de mnaltbilité adjacente,ppli idt fait une exceptter pour le schéma fil?://les triples slashsidtd (fil?:///idth/p>h/blockquot?widh/divwiiidadiv clasd> .hfseal1 seealson.idl..hfseal1-s="alternate" href-seealsonwidthh3 clasd> p"can">Voir aunei paei-widt "ul clasd> s member"> s="alter"> s="alter" - Retourne dhs informalters sur>un chemin système member"> s="alter"> s="alter" - Analyon une requêt? HTTP member"> s="alter"> s="alter" - G&ea member"> s="alter"> s="alter" - Renvoi/ le chemin du doneinr>=aient member"> s="alter"> s="alter" - Retourne le nom 2. la mnosa.p?pfinale d'un chemin member"> rl"> extertil">» RFC 3986idh/divwiih/divw ewpo-widt aalter"> User Cx.tribul"/ Not?st coup"-w74 not?s not? idl.106731">dthdiv clasd> vot?snwidt thdiv idl.Vu106731">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V106731"" type="75% like this...">idt t96idtdth/divwidth/divwidthase-url.#106731""clasd> nial">idt userth g &paei;

    d2.php.type="2011-12-02 02:50">6 yete" ago p.rawuidl.H m106731">ipdiv clasd> phpfr2."> e <> [If you haven't yet] be.n abl? topfind a s
    d.php.net<?php

    $" h
    keyword">= stringth'">ttp:metusr:pss@exa' keyword">;
    if (
    d.php.net$" h keyword">=== d.php.netunt icon" h keyword">( d.php.nett icon" h keyword">( d.php.net$" h keyword">))) {
      prin"
    stringth"YES, they malch!\n" keyword">;
    }

    l="alter
    d.php.netunt icon" h keyword">( d.php.net$t icodn" h keyword">) {
     
    d.php.net$scheme   keyword">= isset( d.php.net$t icodn" h keyword">[ stringth'scheme' keyword">]) ? d.php.net$t icodn" h keyword">[ stringth'scheme' keyword">] . stringth'met' keyword">: stringth'' keyword">;
     
    d.php.net$host     keyword">= isset( d.php.net$t icodn" h keyword">[ stringth'host' keyword">]) ? d.php.net$t icodn" h keyword">[ stringth'host' keyword">] : stringth'' keyword">;
     
    d.php.net$=1.0     keyword">= isset( d.php.net$t icodn" h keyword">[ stringth'=1.0' keyword">]) ? stringth'm' keyword">. d.php.net$t icodn" h keyword">[ stringth'=1.0' keyword">] : stringth'' keyword">;
     
    d.php.net$user     keyword">= isset( d.php.net$t icodn" h keyword">[ stringth'user' keyword">]) ? d.php.net$t icodn" h keyword">[ stringth'user' keyword">] : stringth'' keyword">;
     
    d.php.net$=asd     keyword">= isset( d.php.net$t icodn" h keyword">[ stringth'=asd' keyword">]) ? stringth'm' keyword">. d.php.net$t icodn" h keyword">[ stringth'=asd' keyword">]  : stringth'' keyword">;
     
    d.php.net$=asd     keyword">= ( d.php.net$"ser keyword">|| d.php.net$=asd keyword">) ? stringth" d.php.net$=asd stringth@" keyword">: stringth'' keyword">;
     
    d.php.net$=ath     keyword">= isset( d.php.net$t icodn" h keyword">[ stringth'=ath' keyword">]) ? d.php.net$t icodn" h keyword">[ stringth'=ath' keyword">] : stringth'' keyword">;
     
    d.php.net$hp.ne    keyword">= isset( d.php.net$t icodn" h keyword">[ stringth'hp.ne' keyword">]) ? stringth'?' keyword">. d.php.net$t icodn" h keyword">[ stringth'hp.ne' keyword">] : stringth'' keyword">;
     
    d.php.net$fragment keyword">= isset( d.php.net$t icodn" h keyword">[ stringth'fragment' keyword">]) ? stringth'#' keyword">. d.php.net$t icodn" h keyword">[ stringth'fragment' keyword">] : stringth'' keyword">;
      return
    stringth" d.php.net$scheme$"ser$=asd$host$=1.0$=ath$hp.ne$fragment stringth" keyword">;
    }

    d.php.net?> not? idl.114817">dthdiv clasd> vot?snwidt thdiv idl.Vu114817">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V114817"" type="74% like this...">idt t17idtdth/divwidth/divwidthase-url.#114817""clasd> nial">idt userth g d&paei;
    d2.php.type="2014-04-09 08:49">3 yete" ago p.rawuidl.H m114817">ipdiv clasd> phpfr2."> e <> Here is utf-8 mnaltble atecon" h() replacement l="alter biond er "laszlo pot janszky at gmail pot m" work. Original in rreally hanmlnd URLs lethpuser:t ss. Also madeppli 5.5 mnaltble (got rid ef now depreaal"/ regex /t modifier).

    d.php.net<?php

       
    mmhp"-w/**
         * UTF-8 aware atecon" h() replacement.
         *
         * @return array
         */
       
    keyword">l="alter d.php.netmb_t icon" h keyword">( d.php.net$" h keyword">)
        {
           
    d.php.net$enc_" h keyword">= d.php.nettreg_replace_callback keyword">(
               
    stringth'%[^:/@?&=#]+%usD' keyword">,
                l="alter (
    d.php.net$malched keyword">)
                {
                    return
    d.php.neturlenfr2e keyword">( d.php.net$malched keyword">[ d.php.net0 keyword">]);
                },
               
    d.php.net$" h
           
    keyword">);
           
           
    d.php.net$parts keyword">= d.php.nett icon" h keyword">( d.php.net$enc_" h keyword">);
           
            if(
    d.php.net$t its keyword">=== d.php.netfalse keyword">)
            {
                throw new \
    d.php.netInvalidArgumentExceptter keyword">( stringth'Malformnd URL: ' keyword">. d.php.net$" h keyword">);
            }
           
            foreach(
    d.php.net$t its keyword">as d.php.net$nial keyword">=> d.php.net$valul keyword">)
            {
               
    d.php.net$t its keyword">[ d.php.net$nial keyword">] = d.php.netup://fr2. keyword">( d.php.net$valul keyword">);
            }
           
            return
    d.php.net$t its keyword">;
        }

    d.php.net?> not? idl.116520">dthdiv clasd> vot?snwidt thdiv idl.Vu116520">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V116520"" type="70% like this...">idt t13idtdth/divwidth/divwidthase-url.#116520""clasd> nial">idt userth g d&paei;
    d2.php.type="2015-01-16 10:53">2 yete" ago p.rawuidl.H m116520">ipdiv clasd> phpfr2."> e <> It may be worthpremindingpthat the valul ef the #fragment nek r ge"> .ent to the derk rt  A.chors prop.neinglis exclusively client-side. not? idl.96433">dthdiv clasd> vot?snwidt thdiv idl.Vu96433">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V96433"" type="67% like this...">idt t19idtdth/divwidth/divwidthase-url.#96433""clasd> nial">idt userth g d&paei;
    d2.php.type="2010-02-26 11:24">7 yete" ago p.rawuidl.H m96433">ipdiv clasd> phpfr2."> e <> I was wriltngpunit tests and neednd to cause this l="alter to kick out an error and return FALSE in ord r to test a specific executter pathp If anyone else needs topforcl a failure, the follrwinglinputs lell work:

    d.php.net<?php
    t icon" h
    keyword">( stringth"">ttp:met/exa" keyword">);
    d.php.nett icon" h keyword">( stringth"">ttp:met:80" keyword">);
    d.php.nett icon" h keyword">( stringth"">ttp:metuser@:80" keyword">);
    d.php.net?> not? idl.114704">dthdiv clasd> vot?snwidt thdiv idl.Vu114704">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V114704"" type="65% like this...">idt t8idtdth/divwidth/divwidthase-url.#114704""clasd> nial">idt userth g d&paei;
    d2.php.type="2014-03-26 04:49">3 yete" ago p.rawuidl.H m114704">ipdiv clasd> phpfr2."> e <> Here's a good way topueinglt icon" h () ge"> the youtube rl">.
    This l="alter Ipused in
    d.php.net<?php
    keyword">l="alter d.php.netyoutube keyword">( d.php.net$" h keyword">, d.php.net$le>PH keyword">= d.php.net560 keyword">, d.php.net$ueight keyword">= d.php.net315 keyword">, d.php.net$full.cre.n keyword">= d.php.nettrul keyword">)
    {
       
    d.php.nett iconstr keyword">( d.php.nett icon" h keyword">( d.php.net$" h keyword">, d.php.netort_URL_QUERY keyword">), d.php.net$my_array_of_vte" keyword">);
       
    d.php.net$youtube keyword">= stringth'<ifeial allrwtrans=aiency> prul" .crolling> no" le>PHP"' keyword">. d.php.net$le>PH keyword">. stringth'"fueighti"' keyword">. d.php.net$ueight keyword">. stringth'"ferni"eta chyoutube. m/embed/' keyword">. d.php.net$my_array_of_vte" keyword">[ stringth'v' keyword">]. stringth'"ffeialbord r="0"' keyword">.( d.php.net$full.cre.n keyword">? stringth' allrwfull.cre.n' keyword">: d.php.netNULL keyword">). stringth'></ifeial>' keyword">;
        return
    d.php.net$youtube keyword">;
    }

    mmhp"-w// show youtube on my pag/
    d.php.net$" h keyword">= stringth'">ttp:meta chyoutube. m/walch?v=yvTd6XxgCBE' keyword">;
    d.php.netyoutube keyword">( d.php.net$" h keyword">, d.php.net560 keyword">, d.php.net315 keyword">, d.php.nettrul keyword">);
    d.php.net?>

    t icon" h () allraal"s a unihp. youtube fr2. and  put intopifeial rl"> and displaynd er your pag/. The dizl ef the videos choos. youicolf.

    Enjoy. not? idl.108787">dthdiv clasd> vot?snwidt thdiv idl.Vu108787">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V108787"" type="63% like this...">idt t3idtdth/divwidth/divwidthase-url.#108787""clasd> nial">idt userth g d&paei;
    d2.php.type="2012-05-24 08:20">5 yete" ago p.rawuidl.H m108787">ipdiv clasd> phpfr2."> e <> Creal"/ atothnr>=aicon" h utf-8 mnaltble l="altern
    d.php.net<?php
    keyword">l="alter d.php.netmb_t icon" h keyword">( d.php.net$" h keyword">) {
       
    d.php.net$enfr2edU h keyword">= d.php.nettreg_replace keyword">( stringth'%[^:/?#&=\.]+%usDe' keyword">, stringth'urlenfr2e(\'$0\')' keyword">, d.php.net$" h keyword">);
       
    d.php.net$ mnonents keyword">= d.php.nett icon" h keyword">( d.php.net$encr2edU h keyword">);
        foreach (
    d.php.net$ mnonents keyword">as & d.php.net$ mnonent keyword">)
           
    d.php.net$ mnonent keyword">= d.php.netup://fr2. keyword">( d.php.net$ mnonent keyword">);
        return
    d.php.net$ mnonents keyword">;
    }
    d.php.net?> not? idl.100114">dthdiv clasd> vot?snwidt thdiv idl.Vu100114">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V100114"" type="63% like this...">idt t5idtdth/divwidth/divwidthase-url.#100114""clasd> nial">idt userth g d&paei;
    d2.php.type="2010-09-25 07:48">7 yete" ago p.rawuidl.H m100114">ipdiv clasd> phpfr2."> e <> @ solenoid: Your fr2. was very helpful, but it fails when the curient URL has no hp.nepstring (it appends '&' instead ef '?' before the hp.ne)t  Belrwlis a fix"/ versih. that calched this edge cts. and rreals it.

    d.php.net<?php
    keyword">l="alter d.php.netmodifyn" h keyword">( d.php.net$mod keyword">)
    {
       
    d.php.net$" h keyword">= stringth"">ttp:met" keyword">. d.php.net$_SERVER keyword">[ stringth'HTTP_HOST' keyword">]. d.php.net$_SERVER keyword">[ stringth'REQUEST_URI' keyword">];
       
    d.php.net$hp.nep keyword">= d.php.netexplr2. keyword">( stringth"&" keyword">, d.php.net$_SERVER keyword">[ stringth'QUERY_STRING' keyword">]);
        if (!
    d.php.net$_SERVER keyword">[ stringth'QUERY_STRING' keyword">]) { d.php.net$hp.neStart keyword">= stringth"?" keyword">;} else { d.php.net$hp.neStart keyword">= stringth"&" keyword">;}
       
    mmhp"-w// modify/delet? pata
       
    keyword">loreach( d.php.net$hp.nep keyword">as d.php.net$q keyword">)
        {
            list(
    d.php.net$key keyword">, d.php.net$valul keyword">) = d.php.netexplr2. keyword">( stringth"=" keyword">, d.php.net$q keyword">);
            if(
    d.php.netarray_key_exists keyword">( d.php.net$key keyword">, d.php.net$mod keyword">))
            {
                if(
    d.php.net$mod keyword">[ d.php.net$key keyword">])
                {
                   
    d.php.net$" h keyword">= d.php.nettreg_replace keyword">( stringth'/' keyword">. d.php.net$key keyword">. stringth'=' keyword">. d.php.net$valul keyword">. stringth'/' keyword">, d.php.net$key keyword">. stringth'=' keyword">. d.php.net$mod keyword">[ d.php.net$key keyword">], d.php.net$" h keyword">);
                }
                else
                {
                   
    d.php.net$" h keyword">= d.php.nettreg_replace keyword">( stringth'/&?' keyword">. d.php.net$key keyword">. stringth'=' keyword">. d.php.net$valul keyword">. stringth'/' keyword">, stringth'' keyword">, d.php.net$" h keyword">);
                }
            }
        }
       
    mmhp"-w// add new pata
       
    keyword">loreach( d.php.net$modp keyword">as d.php.net$key keyword">=> d.php.net$valul keyword">)
        {
            if(
    d.php.net$valul keyword">&& ! d.php.nettreg_malch keyword">( stringth'/' keyword">. d.php.net$key keyword">. stringth'=/' keyword">, d.php.net$" h keyword">))
            {
               
    d.php.net$" h keyword">.= d.php.net$hp.neStart keyword">. d.php.net$key keyword">. stringth'=' keyword">. d.php.net$valul keyword">;
            }
        }
        return
    d.php.net$" h keyword">;
    }
    d.php.net?> not? idl.95304">dthdiv clasd> vot?snwidt thdiv idl.Vu95304">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V95304"" type="60% like this...">idt t2idtdth/divwidth/divwidthase-url.#95304""clasd> nial">idt userth g d&paei;
    d2.php.type="2009-12-25 05:57">7 yete" ago p.rawuidl.H m95304">ipdiv clasd> phpfr2."> e <> Thanks topxellisx for his t iconhp.nepl="altern Ipused it in onl ef my projeals and it works well. But it has an errorn Ipfix"/ the error and improved it a litype bit. Here is my versih. ef it:

    d.php.net<?php
    mmhp"-w// Originally wrilten bypxellisx
    keyword">l="alter d.php.nett iconhp.ne keyword">( d.php.net$var keyword">)
    {
     
    mmhp"-w/**
       *  Use this l="alter to t ico out the hp.ne array element lr m
       *  the output ef atecon" h().
       */
     
    d.php.net$var  keyword">= d.php.nett icon" h keyword">( d.php.net$var keyword">, d.php.netort_URL_QUERY keyword">);
     
    d.php.net$var  keyword">= d.php.nete _entity_//fr2. keyword">( d.php.net$var keyword">);
     
    d.php.net$var  keyword">= d.php.netexplr2. keyword">( stringth'&' keyword">, d.php.net$var keyword">);
     
    d.php.net$arr  keyword">= array();

      loreach(
    d.php.net$varp keyword">as d.php.net$val keyword">)
       {
       
    d.php.net$x          keyword">= d.php.netexplr2. keyword">( stringth'=' keyword">, d.php.net$val keyword">);
       
    d.php.net$arr keyword">[ d.php.net$x keyword">[ d.php.net0 keyword">]] = d.php.net$x keyword">[ d.php.net1 keyword">];
       }
      unset(
    d.php.net$val keyword">, d.php.net$x keyword">, d.php.net$var keyword">);
      return
    d.php.net$arr keyword">;
    }
    d.php.net?>

    At the first rl"e ther. was t iconhp.ne($val), Ipmadepit $varn Itpused to return a null array before this lix.

    I have add"/ the =aicon" h rl"e. So now the f="alter lell only focus in the hp.ne t it, not the whol/ URL. This is useful if something like belrwlis donl:
    d.php.net<?php
    $my_GET
    keyword">= d.php.nett iconhp.ne keyword">( d.php.net$_SERVER keyword">[ stringth'REQUEST_URI' keyword">]);
    d.php.net?> not? idl.116456">dthdiv clasd> vot?snwidt thdiv idl.Vu116456">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V116456"" type="57% like this...">idt t5idtdth/divwidth/divwidthase-url.#116456""clasd> nial">idt userth g d&paei;
    d2.php.type="2015-01-06 06:46">2 yete" ago p.rawuidl.H m116456">ipdiv clasd> phpfr2."> e <> d.php.net<?php
    keyword">l="alter d.php.netref_t ico keyword">( d.php.net$" h keyword">){
    d.php.net$sflfdfldf keyword">= d.php.net$" h keyword">;
    if(
    d.php.netstrpos keyword">( d.php.net$" h keyword">, stringth"?" keyword">)>- d.php.net1 keyword">){
    d.php.net$a keyword">= d.php.netexplr2. keyword">( stringth"?" keyword">, d.php.net$" h keyword">, d.php.net2 keyword">);
    d.php.net$" h keyword">= d.php.net$a keyword">[ d.php.net0 keyword">];
    d.php.net$hp.ne keyword">= d.php.net$a keyword">[ d.php.net1 keyword">];
    }
    if(
    d.php.netstrpos keyword">( d.php.net$" h keyword">, stringth"met" keyword">)>- d.php.net1 keyword">){
    d.php.net$scheme keyword">= d.php.netsubstr keyword">( d.php.net$" h keyword">, d.php.net0 keyword">, d.php.netstrpos keyword">( d.php.net$" h keyword">, stringth"et" keyword">)- d.php.net1 keyword">);
    d.php.net$" h keyword">= d.php.netsubstr keyword">( d.php.net$" h keyword">, d.php.netstrpos keyword">( d.php.net$" h keyword">, stringth"et" keyword">)+ d.php.net2 keyword">, d.php.netstrl.n keyword">( d.php.net$" h keyword">));
    }
    if(
    d.php.netstrpos keyword">( d.php.net$" h keyword">, stringth"t" keyword">)>- d.php.net1 keyword">){
    d.php.net$a keyword">= d.php.netexplr2. keyword">( stringth"t" keyword">, d.php.net$" h keyword">, d.php.net2 keyword">);
    d.php.net$" h keyword">= d.php.net$a keyword">[ d.php.net0 keyword">];
    d.php.net$path keyword">= stringth"t" keyword">. d.php.net$a keyword">[ d.php.net1 keyword">];
    }
    if(
    d.php.netstrpos keyword">( d.php.net$" h keyword">, stringth"m" keyword">)>- d.php.net1 keyword">){
    d.php.net$a keyword">= d.php.netexplr2. keyword">( stringth"m" keyword">, d.php.net$" h keyword">, d.php.net2 keyword">);
    d.php.net$" h keyword">= d.php.net$a keyword">[ d.php.net0 keyword">];
    d.php.net$port keyword">= d.php.net$a keyword">[ d.php.net1 keyword">];
    }
    d.php.net$host keyword">= d.php.net$" h keyword">;
    d.php.net$" h keyword">= d.php.netnull keyword">;
    loreach(array(
    stringth"" h" keyword">, stringth"scheme" keyword">, stringth"host" keyword">, stringth"port" keyword">, stringth"path" keyword">, stringth"hp.ne" keyword">) as d.php.net$var keyword">){
    if(!empty($
    d.php.net$var keyword">)){
    d.php.net$return keyword">[ d.php.net$var keyword">]=$ d.php.net$var keyword">;
    }
    }
    mmhp"-w//return array("" h"=>$sflfdfldf,"scheme"=>$scheme,"host"=>$host,"port"=>$port,"path"=>$path,"hp.ne"=>$hp.ne,"a"=>$" h);
    keyword">return d.php.net$return keyword">;
    }
    d.php.net?>

    d.php.net<?php
    mmhp"-w/* C mnare two outputs */
    //min/
    d.php.netprint_r keyword">( d.php.netref_t ico keyword">( stringth"">ttp:metlogin.yahoo. m?.erniym&.intl=gb&.lang=zh-Hans-HK&.donl=ttp:smetmail.yahoo. m" keyword">));
    mmhp"-w//internal
    d.php.netprint_r keyword">( d.php.nett icon" h keyword">( stringth"">ttp:metlogin.yahoo. m?.erniym&.intl=gb&.lang=zh-Hans-HK&.donl=ttp:smetmail.yahoo. m" keyword">));
    d.php.net?> not? idl.93983">dthdiv clasd> vot?snwidt thdiv idl.Vu93983">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V93983"" type="58% like this...">idt t3idtdth/divwidth/divwidthase-url.#93983""clasd> nial">idt userth g d&paei;
    d2.php.type="2009-10-09 02:45">8 yete" ago p.rawuidl.H m93983">ipdiv clasd> phpfr2."> e <> Hellr, for some odd reason, =aicon" h return> the host (ex. exal="alter d.php.netgthHost keyword">( d.php.net$Addresd keyword">) {
      
    d.php.net$paicoU h keyword">= d.php.nett icon" h keyword">( d.php.nettrim keyword">( d.php.net$Addresd keyword">));
       return
    d.php.nettrim keyword">( d.php.net$paicoU h keyword">[ d.php.nethost keyword">] ? d.php.net$paicoU h keyword">[ d.php.nethost keyword">] : d.php.netarray_shift keyword">( d.php.netexplr2. keyword">( stringth'/' keyword">, d.php.net$paicoU h keyword">[ d.php.netpath keyword">], d.php.net2 keyword">)));
    }

    d.php.netgthHost keyword">( stringth"exa keyword">); mmhp"-w// Gives exa d.php.netgthHost keyword">( stringth"">ttp:metexa" keyword">); mmhp"-w// Gives exa d.php.netgthHost keyword">( stringth"a chexa keyword">); mmhp"-w// Gives a chexa d.php.netgthHost keyword">( stringth"">ttp:metexa" keyword">); mmhp"-w// Gives exa d.php.net?>

    You uld tne anything! Itpgives the host (includingpthe subdomain if exists).

    Hopepit helped you.
    not? idl.90365">dthdiv clasd> vot?snwidt thdiv idl.Vu90365">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V90365"" type="58% like this...">idt t2idtdth/divwidth/divwidthase-url.#90365""clasd> nial">idt userth g d&paei;
    d2.php.type="2009-04-17 05:08">8 yete" ago p.rawuidl.H m90365">ipdiv clasd> phpfr2."> e <> An upd2.p to the l="alter by FredLudd at gmail pot mt  I add"/ IPv6 l="alterality as well.

    d.php.net<?php
    keyword">l="alter d.php.netj_paicoU h keyword">( d.php.net$" h keyword">) {
     
    d.php.net$r  keyword">= stringth"(?:([a-z0-9+-._]+)met)?" keyword">;
     
    d.php.net$r keyword">.= stringth"(?:" keyword">;
     
    d.php.net$r keyword">.=   stringth"(?:((?:[a-z0-9-._~!$&'()*+,;=:]|%[0-9a-f]{2})*)@)?" keyword">;
     
    d.php.net$r keyword">.=   stringth"(?:\[((?:[a-z0-9:])*)\])?" keyword">;
     
    d.php.net$r keyword">.=   stringth"((?:[a-z0-9-._~!$&'()*+,;=]|%[0-9a-f]{2})*)" keyword">;
     
    d.php.net$r keyword">.=   stringth"(?::(\d*))?" keyword">;
     
    d.php.net$r keyword">.=   stringth"(/(?:[a-z0-9-._~!$&'()*+,;=:@/]|%[0-9a-f]{2})*)?" keyword">;
     
    d.php.net$r keyword">.=   stringth"|" keyword">;
     
    d.php.net$r keyword">.=   stringth"(/?" keyword">;
     
    d.php.net$r keyword">.=     stringth"(?:[a-z0-9-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+" keyword">;
     
    d.php.net$r keyword">.=     stringth"(?:[a-z0-9-._~!$&'()*+,;=:@\/]|%[0-9a-f]{2})*" keyword">;
     
    d.php.net$r keyword">.=    stringth")?" keyword">;
     
    d.php.net$r keyword">.= stringth")" keyword">;
     
    d.php.net$r keyword">.= stringth"(?:\?((?:[a-z0-9-._~!$&'()*+,;=:\/?@]|%[0-9a-f]{2})*))?" keyword">;
     
    d.php.net$r keyword">.= stringth"(?:#((?:[a-z0-9-._~!$&'()*+,;=:\/?@]|%[0-9a-f]{2})*))?" keyword">;
     
    d.php.nettreg_malch keyword">( stringth"` d.php.net$r stringth`i" keyword">, d.php.net$" h keyword">, d.php.net$malch keyword">);
     
    d.php.net$t its keyword">= array(
               
    stringth"scheme" keyword">=> stringth'' keyword">,
               
    stringth"userinfo" keyword">=> stringth'' keyword">,
               
    stringth"authority" keyword">=> stringth'' keyword">,
               
    stringth"host" keyword">=> stringth'' keyword">,
               
    stringth"port" keyword">=> stringth'' keyword">,
               
    stringth"path" keyword">=> stringth'' keyword">,
               
    stringth"hp.ne" keyword">=> stringth'' keyword">,
               
    stringth"fragmhp"- keyword">=> stringth'' keyword">);
      switch (
    d.php.netcount keyword">( d.php.net$malch keyword">)) {
        cts.
    d.php.net10 keyword">: d.php.net$t its keyword">[ stringth'fragmhp"' keyword">] = d.php.net$malch keyword">[ d.php.net9 keyword">];
        cts.
    d.php.net9 keyword">: d.php.net$t its keyword">[ stringth'hp.ne' keyword">] = d.php.net$malch keyword">[ d.php.net8 keyword">];
        cts.
    d.php.net8 keyword">: d.php.net$t its keyword">[ stringth'path' keyword">] =  d.php.net$malch keyword">[ d.php.net7 keyword">];
        cts.
    d.php.net7 keyword">: d.php.net$t its keyword">[ stringth'path' keyword">] =  d.php.net$malch keyword">[ d.php.net6 keyword">] . d.php.net$t its keyword">[ stringth'path' keyword">];
        cts.
    d.php.net6 keyword">: d.php.net$t its keyword">[ stringth'port' keyword">] =  d.php.net$malch keyword">[ d.php.net5 keyword">];
        cts.
    d.php.net5 keyword">: d.php.net$t its keyword">[ stringth'host' keyword">] =  d.php.net$malch keyword">[ d.php.net3 keyword">]? stringth"[" keyword">. d.php.net$malch keyword">[ d.php.net3 keyword">]. stringth"]" keyword">: d.php.net$malch keyword">[ d.php.net4 keyword">];
        cts.
    d.php.net4 keyword">: d.php.net$t its keyword">[ stringth'userinfo' keyword">] =  d.php.net$malch keyword">[ d.php.net2 keyword">];
        cts.
    d.php.net3 keyword">: d.php.net$t its keyword">[ stringth'scheme' keyword">] =  d.php.net$malch keyword">[ d.php.net1 keyword">];
      }
     
    d.php.net$t its keyword">[ stringth'authority' keyword">] = ( d.php.net$paits keyword">[ stringth'userinfo' keyword">]? d.php.net$paits keyword">[ stringth'userinfo' keyword">]. stringth"@" keyword">: stringth"" keyword">).
                            
    d.php.net$t its keyword">[ stringth'host' keyword">].
                            (
    d.php.net$paits keyword">[ stringth'port' keyword">]? stringth":" keyword">. d.php.net$paits keyword">[ stringth'port' keyword">]: stringth"" keyword">);
      return
    d.php.net$paits keyword">;
    }
    d.php.net?>

    When usingpthe " h

      /* rl"e too long for this site's mmhp" handler */
      "foo://usertame:pasdword@[2001:4860:0:2001::68]:8042".
          "/over/ther./index.dtb;type=animal?tame=ferret#nose"

    The original w uld return

    Array
    (
        [scheme] => foo
        [userinfo] => usertame:pasdword
        [authority] => usertame:pasdword@
        [host] =>
        [port] =>
        [path] =>
        [hp.ne] =>
        [fragmhp"] =>
    )

    The new onl return>

    Array
    (
        [scheme] => foo
        [userinfo] => usertame:pasdword
        [authority] => usertame:pasdword@[2001:4860:0:2001::68]:8042
        [host] => [2001:4860:0:2001::68]
        [port] => 8042
        [path] => /over/ther./index.dtb;type=animal
        [hp.ne] => tame=ferret
        [fragmhp"] => nose
    )

    All of the other exa not? idl.97496">dthdiv clasd> vot?snwidt thdiv idl.Vu97496">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V97496"" type="55% like this...">idt t1idtdth/divwidth/divwidthase-url.#97496""clasd> nial">idt userth g d&paei;
    d2.php.type="2010-04-22 04:05">7 yete" ago p.rawuidl.H m97496">ipdiv clasd> phpfr2."> e <> Here's a piecl ef fr2. that modifies, replaces or removes the " h hp.ne. This can typically used in pagingpsitualters where ther. are more paeimeters than the =age.

    d.php.net<?php
    keyword">l="alter d.php.netmodifyn" h keyword">( d.php.net$mod keyword">)
    {
       
    d.php.net$" h keyword">= stringth"">ttp:met" keyword">. d.php.net$_SERVER keyword">[ stringth'HTTP_HOST' keyword">]. d.php.net$_SERVER keyword">[ stringth'REQUEST_URI' keyword">];
       
    d.php.net$hp.ne keyword">= d.php.netexplr2. keyword">( stringth"&" keyword">, d.php.net$_SERVER keyword">[ stringth'QUERY_STRING' keyword">]);
       
    mmhp"-w// modify/delet? pata
       
    keyword">loreach( d.php.net$hp.ne keyword">as d.php.net$q keyword">)
        {
            list(
    d.php.net$key keyword">, d.php.net$valul keyword">) = d.php.netexplr2. keyword">( stringth"=" keyword">, d.php.net$q keyword">);
            if(
    d.php.netarray_key_exists keyword">( d.php.net$key keyword">, d.php.net$mod keyword">))
            {
                if(
    d.php.net$mod keyword">[ d.php.net$key keyword">])
                {
                   
    d.php.net$" h keyword">= d.php.nettreg_replace keyword">( stringth'/' keyword">. d.php.net$key keyword">. stringth'=' keyword">. d.php.net$valul keyword">. stringth'/' keyword">, d.php.net$key keyword">. stringth'=' keyword">. d.php.net$mod keyword">[ d.php.net$key keyword">], d.php.net$" h keyword">);
                }
                else
                {
                   
    d.php.net$" h keyword">= d.php.nettreg_replace keyword">( stringth'/&?' keyword">. d.php.net$key keyword">. stringth'=' keyword">. d.php.net$valul keyword">. stringth'/' keyword">, stringth'' keyword">, d.php.net$" h keyword">);
                }
            }
        }
       
    mmhp"-w// add new pata
       
    keyword">loreach( d.php.net$mod keyword">as d.php.net$key keyword">=> d.php.net$valul keyword">)
        {
            if(
    d.php.net$valul keyword">&& ! d.php.nettreg_malch keyword">( stringth'/' keyword">. d.php.net$key keyword">. stringth'=/' keyword">, d.php.net$" h keyword">))
            {
               
    d.php.net$" h keyword">.= stringth'&' keyword">. d.php.net$key keyword">. stringth'=' keyword">. d.php.net$valul keyword">;
            }
        }
        return
    d.php.net$" h keyword">;
    }

    mmhp"-w// =age " h: "">ttp:meta chexa"

    d.php.net$" h keyword">= d.php.netmodifyn" h keyword">(array( stringth'p' keyword">=> d.php.net4 keyword">, stringth'show' keyword">=> stringth'column' keyword">));

    mmhp"-w// $" h = "">ttp:meta chexa"
    d.php.net?> not? idl.112571">dthdiv clasd> vot?snwidt thdiv idl.Vu112571">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V112571"" type="54% like this...">idt t1idtdth/divwidth/divwidthase-url.#112571""clasd> nial">idt userth g d&paei;
    d2.php.type="2013-07-01 12:06">4 yete" ago p.rawuidl.H m112571">ipdiv clasd> phpfr2."> e <> =aicon" h doesn't works if the =rotocol doesn't specified. This seems like sandard, even the youtube doesn't gives the =rotocol nial when g
    So, to avoid bug, you must always fheck, whether the =rovided " h has the =rotocol, and if not (st its with 2 slashes) -- add the .ttp:m" =relix. not? idl.121718">dthdiv clasd> vot?snwidt thdiv idl.Vu121718">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V121718"" type="100% like this...">idt t1idtdth/divwidth/divwidthase-url.#121718""clasd> nial">idt userth g d&paei;
    d2.php.type="2017-10-03 07:23">2 month" ago p.rawuidl.H m121718">ipdiv clasd> phpfr2."> e <> Herelis an upd2.p to the gluln" h() l="alter.

    It can now handle
    d.php.net<?php
    keyword">l="alter d.php.netgluln" h keyword">( d.php.net$ate" d keyword">) {
        if (!
    d.php.netis_array keyword">( d.php.net$ate" d keyword">)) {
            return
    d.php.netfalco keyword">;
        }

       
    d.php.net$" i keyword">= isset( d.php.net$ate" d keyword">[ stringth'scheme' keyword">]) ? d.php.net$paicod keyword">[ stringth'scheme' keyword">]. stringth':' keyword">.(( d.php.netstrtolrwer keyword">( d.php.net$ate" d keyword">[ stringth'scheme' keyword">]) == stringth'mailto' keyword">) ? stringth'' keyword">: stringth'//' keyword">) : stringth'' keyword">;
       
    d.php.net$" i keyword">.= isset( d.php.net$ate" d keyword">[ stringth'user' keyword">]) ? d.php.net$paicod keyword">[ stringth'user' keyword">].(isset( d.php.net$ate" d keyword">[ stringth'pasd' keyword">]) ? stringth':' keyword">. d.php.net$ate" d keyword">[ stringth'pasd' keyword">] : stringth'' keyword">). stringth'@' keyword">: stringth'' keyword">;
       
    d.php.net$" i keyword">.= isset( d.php.net$ate" d keyword">[ stringth'host' keyword">]) ? d.php.net$paicod keyword">[ stringth'host' keyword">] : stringth'' keyword">;
       
    d.php.net$" i keyword">.= isset( d.php.net$ate" d keyword">[ stringth'port' keyword">]) ? stringth':' keyword">. d.php.net$ate" d keyword">[ stringth'port' keyword">] : stringth'' keyword">;

        if (isset(
    d.php.net$ate" d keyword">[ stringth'path' keyword">])) {
           
    d.php.net$" i keyword">.= ( d.php.netsubstr keyword">( d.php.net$ate" d keyword">[ stringth'path' keyword">], d.php.net0 keyword">, d.php.net1 keyword">) == stringth'/' keyword">) ?
               
    d.php.net$ate" d keyword">[ stringth'path' keyword">] : ((!empty( d.php.net$" i keyword">) ? stringth'/' keyword">: stringth'' keyword">) . d.php.net$t i" d keyword">[ stringth'path' keyword">]);
        }

       
    d.php.net$" i keyword">.= isset( d.php.net$ate" d keyword">[ stringth'hp.ne' keyword">]) ? stringth'?' keyword">. d.php.net$ate" d keyword">[ stringth'hp.ne' keyword">] : stringth'' keyword">;
       
    d.php.net$" i keyword">.= isset( d.php.net$ate" d keyword">[ stringth'fragmhp"' keyword">]) ? stringth'#' keyword">. d.php.net$ate" d keyword">[ stringth'fragmhp"' keyword">] : stringth'' keyword">;

        return
    d.php.net$" i keyword">;
    }
    d.php.net?>
    up
    pown

    ">ttp:smetforum.jdael.nett not? idl.121392">dthdiv clasd> vot?snwidt thdiv idl.Vu121392">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V121392"" type="100% like this...">idt t1idtdth/divwidth/divwidthase-url.#121392""clasd> nial">idt userth g d&paei;
    d2.php.type="2017-07-17 01:30">4 month" ago p.rawuidl.H m121392">ipdiv clasd> phpfr2."> e <> Here's a simple clasd I ma2. that makes use of this paicon" h.
    I needed a way for a =age to retain gth paeimeters but also edit or add onto them.
    I also had some =ages that needed the same GET paeimaters so I also add"/ a way to change the =ath.

    d.php.net<?php
    keyword">clasd d.php.netPaths keyword">{

        priv2.p
    d.php.net$" h keyword">;
        public l="alter
    d.php.net__construct keyword">( d.php.net$" h keyword">){
           
    d.php.net$this keyword">-> d.php.net" h keyword">= d.php.nett icon" h keyword">( d.php.net$" h keyword">);
        }
       
        public l="alter
    d.php.netreturnU h keyword">(){
           
    d.php.net$return keyword">= d.php.net$this keyword">-> d.php.net" h keyword">[ stringth'path' keyword">]. stringth'?' keyword">. d.php.net$this keyword">-> d.php.net" h keyword">[ stringth'hp.ne' keyword">];
           
    d.php.net$return keyword">= ( d.php.netsubstr keyword">( d.php.net$return keyword">,- d.php.net1 keyword">) == stringth"&" keyword">)? d.php.netsubstr keyword">( d.php.net$return keyword">, d.php.net0 keyword">,- d.php.net1 keyword">) : d.php.net$return keyword">;
           
    d.php.net$this keyword">-> d.php.netresetQp.ne keyword">();
            return
    d.php.net$return keyword">;
        }
       
        public l="alter
    d.php.netchangePath keyword">( d.php.net$atth keyword">){
           
    d.php.net$this keyword">-> d.php.net" h keyword">[ stringth'path' keyword">] = d.php.net$atth keyword">;
        }
       
        public l="alter
    d.php.neteditQp.ne keyword">( d.php.net$gth keyword">, d.php.net$valul keyword">){
           
    d.php.net$t its keyword">= d.php.netexplr2. keyword">( stringth"&" keyword">, d.php.net$this keyword">-> d.php.net" h keyword">[ stringth'hp.ne' keyword">]);
           
    d.php.net$return keyword">= stringth"" keyword">;
            loreach(
    d.php.net$t its keyword">as d.php.net$p keyword">){
               
    d.php.net$t iamData keyword">= d.php.netexplr2. keyword">( stringth"=" keyword">, d.php.net$p keyword">);
                if(
    d.php.net$t iamData keyword">[ d.php.net0 keyword">] == d.php.net$gth keyword">){
                   
    d.php.net$t iamData keyword">[ d.php.net1 keyword">] = d.php.net$valul keyword">;
                }
               
    d.php.net$return keyword">.= d.php.netimplr2. keyword">( stringth"=" keyword">, d.php.net$p iamData keyword">). stringth'&' keyword">;
               
            }
           
           
    d.php.net$this keyword">-> d.php.net" h keyword">[ stringth'hp.ne' keyword">] = d.php.net$return keyword">;
        }
       
        public l="alter
    d.php.netaddQp.ne keyword">( d.php.net$gth keyword">, d.php.net$valul keyword">){
           
    d.php.net$t it keyword">= d.php.net$gth keyword">. stringth"=" keyword">. d.php.net$valul keyword">;
           
    d.php.net$and keyword">= ( d.php.net$this keyword">-> d.php.net" h keyword">[ stringth'hp.ne' keyword">] == stringth"?" keyword">) ? stringth"" keyword">: stringth"&" keyword">;
           
    d.php.net$this keyword">-> d.php.net" h keyword">[ stringth'hp.ne' keyword">] .= d.php.net$and keyword">. d.php.net$t it keyword">;
        }
       
        public l="alter
    d.php.netfheckQp.ne keyword">( d.php.net$gth keyword">){
           
    d.php.net$t its keyword">= d.php.netexplr2. keyword">( stringth"&" keyword">, d.php.net$this keyword">-> d.php.net" h keyword">[ stringth'hp.ne' keyword">]);
           
                loreach(
    d.php.net$t its keyword">as d.php.net$p keyword">){
                   
    d.php.net$t iamData keyword">= d.php.netexplr2. keyword">( stringth"=" keyword">, d.php.net$p keyword">);
                    if(
    d.php.net$t iamData keyword">[ d.php.net0 keyword">] == d.php.net$gth keyword">)
                        return
    d.php.nettrul keyword">;
                }
                return
    d.php.netfalco keyword">;
           
        }
       
        public l="alter
    d.php.netbuildQp.ne keyword">( d.php.net$gth keyword">, d.php.net$valul keyword">){
            if(
    d.php.net$this keyword">-> d.php.netfheckQp.ne keyword">( d.php.net$gth keyword">))
               
    d.php.net$this keyword">-> d.php.neteditQp.ne keyword">( d.php.net$gth keyword">, d.php.net$valul keyword">);
            else
               
    d.php.net$this keyword">-> d.php.netaddQp.ne keyword">( d.php.net$gth keyword">, d.php.net$valul keyword">);
           
        }
       
        public l="alter
    d.php.netresetQp.ne keyword">(){
           
    d.php.net$this keyword">-> d.php.net" h keyword">= d.php.nett icon" h keyword">( d.php.net$_SERVER keyword">[ stringth'REQUEST_URI' keyword">]);
        }
       
       
       

    }
    d.php.net?>

    Useage:

    Testcachefoo=1:

    d.php.net<?php
    $atth
    keyword">= new d.php.netPaths keyword">( d.php.net$_SERVER keyword">[ stringth'REQUEST_URI' keyword">]);
    d.php.net$t th keyword">-> d.php.netfhangePath keyword">( stringth"/bazcach" keyword">);
    d.php.net$t th keyword">-> d.php.netbuildQp.ne keyword">( stringth"foo" keyword">, d.php.net2 keyword">);
    d.php.net$t th keyword">-> d.php.netbuildQp.ne keyword">( stringth"bar" keyword">, d.php.net3 keyword">);
    echo
    d.php.net$atth keyword">-> d.php.netreturnU h keyword">();
    d.php.net?>

    return>: /bazcachefoo=2&bar=3   

    Hope thislis of some use to someone! not? idl.119033">dthdiv clasd> vot?snwidt thdiv idl.Vu119033">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V119033"" type="100% like this...">idt t1idtdth/divwidth/divwidthase-url.#119033""clasd> nial">idt userth g d&paei;
    d2.php.type="2016-03-20 12:30">1 yete ago p.rawuidl.H m119033">ipdiv clasd> phpfr2."> e <> I have fr2./ a l="alter which conveits
    The follrwing l="alter takes in 2 paeimeters, the firsh paeimeterlis the URL you want to conveit from
    Currentlypit does not resolve '../' in the URL, only because I do not needpit. Most webservers well resolve thislfor you. If you want it to resolve the '../' in the atth, it just takes minor modificalters.

    d.php.net<?php

    keyword">l="alter d.php.net keyword">( d.php.net$in" h keyword">, d.php.net$absolute keyword">) {
       
    mmhp"-w// Get all t its so not gthtingpthem mp.niple times :)
       
    d.php.net$absolute_t its keyword">= d.php.nett icon" h keyword">( d.php.net$absolute keyword">);   
       
    mmhp"-w// Test if URL is already absolute (contains host, or begins with '/')
       
    keyword">if ( ( d.php.netstrpos keyword">( d.php.net$in" h keyword">, d.php.net$absolute_t its keyword">[ stringth'host' keyword">]) == d.php.netfalco keyword">) ) {
           
    mmhp"-w// Defl"e $tmp" h=relix to =revhp" errors belrw
           
    d.php.net$tmp" h=relix keyword">= stringth"" keyword">;
           
    mmhp"-w// Formp.ate URL =relix    (SCHEME)                   
           
    keyword">if (!(empty( d.php.net$absolute_t its keyword">[ stringth'scheme' keyword">]))) {
               
    mmhp"-w// Add scheme to tmp" h=relix
               
    d.php.net$tmp" h=relix keyword">.= d.php.net$absolute_t its keyword">[ stringth'scheme' keyword">] . stringth"met" keyword">;
            }
           
    mmhp"-w// Formp.ate URL =relix (USER, PASS)   
           
    keyword">if ((!(empty( d.php.net$absolute_t its keyword">[ stringth'user' keyword">]))) and (!(empty( d.php.net$absolute_t its keyword">[ stringth'pasd' keyword">])))) {
               
    mmhp"-w// Add user:port to tmp" h=relix
               
    d.php.net$tmp" h=relix keyword">.= d.php.net$absolute_t its keyword">[ stringth'user' keyword">] . stringth"m" keyword">. d.php.net$absolute_t its keyword">[ stringth'pasd' keyword">] . stringth"@" keyword">;   
            }
           
    mmhp"-w// Formp.ate URL =relix    (HOST, PORT)   
           
    keyword">if (!(empty( d.php.net$absolute_t its keyword">[ stringth'host' keyword">]))) {
               
    mmhp"-w// Add host to tmp" h=relix
               
    d.php.net$tmp" h=relix keyword">.= d.php.net$absolute_t its keyword">[ stringth'host' keyword">];
               
    mmhp"-w// Check for a =ort, add if exists
               
    keyword">if (!(empty( d.php.net$absolute_t its keyword">[ stringth'port' keyword">]))) {
                   
    mmhp"-w// Add port to tmp" h=relix
                   
    d.php.net$tmp" h=relix keyword">.= stringth"m" keyword">. d.php.net$absolute_t its keyword">[ stringth'port' keyword">];
                }
            }
           
    mmhp"-w// Formp.ate URL =relix    (PATH) and only add it if the =tth to image does not include ./   
           
    keyword">if ( (!(empty( d.php.net$absolute_t its keyword">[ stringth'path' keyword">]))) and ( d.php.netsubstr keyword">( d.php.net$in" h keyword">, d.php.net0 keyword">, d.php.net1 keyword">) != stringth'/' keyword">) ) {
               
    mmhp"-w// Gth path t its
               
    d.php.net$t th_t its keyword">= d.php.nett thinfo keyword">( d.php.net$absolute_t its keyword">[ stringth'path' keyword">]);
               
    mmhp"-w// Add ptth to tmp" h=relix
               
    d.php.net$tmp" h=relix keyword">.= d.php.net$t th_t its keyword">[ stringth'dirnial' keyword">];
               
    d.php.net$tmp" h=relix keyword">.= stringth"t" keyword">;
            }
            else {   
               
    d.php.net$tmp" h=relix keyword">.= stringth"t" keyword">;   
            }   
           
    mmhp"-w// Lets         keyword">if ( d.php.netsubstr keyword">( d.php.net$in" h keyword">, d.php.net0 keyword">, d.php.net1 keyword">) == stringth'/' keyword">) { d.php.net$in" h keyword">= d.php.netsubstr keyword">( d.php.net$in" h keyword">, d.php.net1 keyword">); }   
           
    mmhp"-w// Lets         keyword">if ( d.php.netsubstr keyword">( d.php.net$in" h keyword">, d.php.net0 keyword">, d.php.net2 keyword">) == stringth'./' keyword">) { d.php.net$in" h keyword">= d.php.netsubstr keyword">( d.php.net$in" h keyword">, d.php.net2 keyword">); }   
            return
    d.php.net$tmp" h=relix keyword">. d.php.net$in" h keyword">;
        }   
        else {
           
    mmhp"-w// Path is already absolute. Return it :)
           
    keyword">return d.php.net$in" h keyword">;
        }
    }

    mmhp"-w// Defl"e a sample absolute  URL
    d.php.net$absolute keyword">= stringth"">ttp:met" keyword">. stringth"user:pasd@exa keyword">; mmhp"-w// Just evadingpphp.net spam filter, not sure how exa
    /* EXAMPLE 1 */
    keyword">echo d.php.net keyword">( d.php.net$absolute keyword">, d.php.net$absolute keyword">) . stringth"\n" keyword">;
    mmhp"-w/* EXAMPLE 2 */
    keyword">echo d.php.net keyword">( stringth"img.gif" keyword">, d.php.net$absolute keyword">) . stringth"\n" keyword">;
    mmhp"-w/* EXAMPLE 3 */
    keyword">echo d.php.net keyword">( stringth"/img.gif" keyword">, d.php.net$absolute keyword">) . stringth"\n" keyword">;
    mmhp"-w/* EXAMPLE 4 */
    keyword">echo d.php.net keyword">( stringth"./img.gif" keyword">, d.php.net$absolute keyword">) . stringth"\n" keyword">;
    mmhp"-w/* EXAMPLE 5 */
    keyword">echo d.php.net keyword">( stringth"../img.gif" keyword">, d.php.net$absolute keyword">) . stringth"\n" keyword">;
    mmhp"-w/* EXAMPLE 6 */
    keyword">echo d.php.net keyword">( stringth"images/img.gif" keyword">, d.php.net$absolute keyword">) . stringth"\n" keyword">;
    mmhp"-w/* EXAMPLE 7 */
    keyword">echo d.php.net keyword">( stringth"/images/img.gif" keyword">, d.php.net$absolute keyword">) . stringth"\n" keyword">;
    mmhp"-w/* EXAMPLE 8 */
    keyword">echo d.php.net keyword">( stringth"./images/img.gif" keyword">, d.php.net$absolute keyword">) . stringth"\n" keyword">;
    mmhp"-w/* EXAMPLE 9 */
    keyword">echo d.php.net keyword">( stringth"../images/img.gif" keyword">, d.php.net$absolute keyword">) . stringth"\n" keyword">;

    d.php.net?>

    OUTPUTS:
    ttp: met user:pasd@exattp: met user:pasd@exattp: met user:pasd@exattp: met user:pasd@exattp: met user:pasd@exattp: met user:pasd@exattp: met user:pasd@exattp: met user:pasd@exattp: met user:pasd@exa
    Sorry if the above fr2. is not your style, or if you see it as "messy" or you think therelis a betterlway to dopit. I
    Improvemhp"s arelwelcome :)
    not? idl.121722">dthdiv clasd> vot?snwidt thdiv idl.Vu121722">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V121722"" type="no vot?s...">idt t0idtdth/divwidth/divwidthase-url.#121722""clasd> nial">idt userth g d&paei;
    d2.php.type="2017-10-03 07:40">2 month" ago p.rawuidl.H m121722">ipdiv clasd> phpfr2."> e <> Cre2.pd atother paicon" h utf-8 mt tible l="alter.
    d.php.net<?php
    keyword">l="alter d.php.netmb_t icon" h keyword">( d.php.net$" h keyword">) {
       
    d.php.net$enfr2./U h keyword">= d.php.nettreg_replace keyword">( stringth'%[^:/?#&=\.]+%usDl' keyword">, stringth'urlenfr2.(\'$0\')' keyword">, d.php.net$" h keyword">);
       
    d.php.net$ mtonhp"s keyword">= d.php.nett icon" h keyword">( d.php.net$enfr2./U h keyword">);
        loreach (
    d.php.net$ mtonhp"s keyword">as & d.php.net$ mtonhp" keyword">)
           
    d.php.net$ mtonhp" keyword">= d.php.net" hdecr2. keyword">( d.php.net$ mtonhp" keyword">);
        return
    d.php.net$ mtonhp"s keyword">;
    }
    d.php.net?>

    ">ttp:smetforum.jdael.nett not? idl.121721">dthdiv clasd> vot?snwidt thdiv idl.Vu121721">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V121721"" type="no vot?s...">idt t0idtdth/divwidth/divwidthase-url.#121721""clasd> nial">idt userth g d&paei;
    d2.php.type="2017-10-03 07:37">2 month" ago p.rawuidl.H m121721">ipdiv clasd> phpfr2."> e <> Thislf="alter well attempt to ate"
    Attemptingpto ate" a " h like this
    ">ttp:metexa
    Correc.ly produces
    d.php.net<?php
    keyword">array (
     
    stringth'scheme' keyword">=> stringth'ttp:' keyword">,
     
    stringth'host' keyword">=> stringth'exa keyword">,
     
    stringth'path' keyword">=> stringth'/hp"ities/GOA:98/' keyword">,
     
    stringth'hp.ne' keyword">=> stringth'search=8989157d1f22' keyword">,
    );
    d.php.net?>

    However, Attemptingpto ate" the ep"ities/GOA:98/?search=8989157d1f22
    d.php.net<?php
    keyword">array (
     
    stringth'host' keyword">=> stringth'ep"ities' keyword">,
     
    stringth'port' keyword">=> d.php.net98 keyword">,
     
    stringth'path' keyword">=> stringth'/GOA:98/' keyword">,
     
    stringth'hp.ne' keyword">=> stringth'search=8989157d1f22' keyword">,
    )
    d.php.net?>
    If I change :98pto :A98ppaicon" h paicos the URL correc.ly as
    d.php.net<?php
    keyword">array (
     
    stringth'path' keyword">=> stringth'ep"ities/GOA:A98/' keyword">,
     
    stringth'hp.ne' keyword">=> stringth'search=8989157d1f22' keyword">,
    )
    d.php.net?>
    Bottom linp, Avoid usingppaicon" h for
    ">ttp:smetforum.jdael.nett
    not? idl.121720">dthdiv clasd> vot?snwidt thdiv idl.Vu121720">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V121720"" type="no vot?s...">idt t0idtdth/divwidth/divwidthase-url.#121720""clasd> nial">idt userth g d&paei;
    d2.php.type="2017-10-03 07:32">2 month" ago p.rawuidl.H m121720">ipdiv clasd> phpfr2."> e <> To gth the =trams (" h hp.ne) as Associative array, use thislf="alter:

    d.php.net<?php
    mmhp"-w/**
    * Returns the " h hp.ne as associative array
    *
    * @=tram    string    hp.ne
    * @return    array    =trams
    */
    keyword">l="alter d.php.netconveitUrlQp.ne keyword">( d.php.net$qp.ne keyword">) {
       
    d.php.net$qp.neP its keyword">= d.php.netexplr2. keyword">( stringth'&' keyword">, d.php.net$qp.ne keyword">);
       
       
    d.php.net$=trams keyword">= array();
        loreach (
    d.php.net$qp.neP its keyword">as d.php.net$ptram keyword">) {
           
    d.php.net$item keyword">= d.php.netexplr2. keyword">( stringth'=' keyword">, d.php.net$ptram keyword">);
           
    d.php.net$=trams keyword">[ d.php.net$item keyword">[ d.php.net0 keyword">]] = d.php.net$item keyword">[ d.php.net1 keyword">];
        }
       
        return
    d.php.net$=trams keyword">;
    }
    d.php.net?>

    ">ttp:smetforum.jdael.nett not? idl.121719">dthdiv clasd> vot?snwidt thdiv idl.Vu121719">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V121719"" type="no vot?s...">idt t0idtdth/divwidth/divwidthase-url.#121719""clasd> nial">idt userth g d&paei;
    d2.php.type="2017-10-03 07:29">2 month" ago p.rawuidl.H m121719">ipdiv clasd> phpfr2."> e <> To gth the =trams (" h hp.ne) as Associative array, use thislf="alter:

    d.php.net<?php
    mmhp"-w/**
    * Returns the " h hp.ne as associative array
    *
    * @=tram    string    hp.ne
    * @return    array    =trams
    */
    keyword">l="alter d.php.netconveitUrlQp.ne keyword">( d.php.net$qp.ne keyword">) {
       
    d.php.net$qp.neP its keyword">= d.php.netexplr2. keyword">( stringth'&' keyword">, d.php.net$qp.ne keyword">);
       
       
    d.php.net$=trams keyword">= array();
        loreach (
    d.php.net$qp.neP its keyword">as d.php.net$ptram keyword">) {
           
    d.php.net$item keyword">= d.php.netexplr2. keyword">( stringth'=' keyword">, d.php.net$ptram keyword">);
           
    d.php.net$=trams keyword">[ d.php.net$item keyword">[ d.php.net0 keyword">]] = d.php.net$item keyword">[ d.php.net1 keyword">];
        }
       
        return
    d.php.net$=trams keyword">;
    }
    d.php.net?> not? idl.121717">dthdiv clasd> vot?snwidt thdiv idl.Vu121717">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V121717"" type="no vot?s...">idt t0idtdth/divwidth/divwidthase-url.#121717""clasd> nial">idt userth g d&paei;
    d2.php.type="2017-10-03 07:08">2 month" ago p.rawuidl.H m121717">ipdiv clasd> phpfr2."> e <> Do not look for the fragmhp" in $_SERVER['QUERY_STRING'], you well not find it. You sh uld read the fragmhp" in JavaScript for exa">ttp:smetforum.jdael.nett not? idl.121599">dthdiv clasd> vot?snwidt thdiv idl.Vu121599">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V121599"" type="no vot?s...">idt t0idtdth/divwidth/divwidthase-url.#121599""clasd> nial">idt userth g d&paei;
    d2.php.type="2017-09-02 10:32">3 month" ago p.rawuidl.H m121599">ipdiv clasd> phpfr2."> e <> d.php.net<?php
    keyword">l="alter d.php.netgluon" h keyword">( d.php.net$ate" d keyword">) {
        if (!
    d.php.netis_array keyword">( d.php.net$ate" d keyword">)) {
            return
    d.php.netfalco keyword">;
        }

       
    d.php.net$uri keyword">= isset( d.php.net$ate" d keyword">[ stringth'scheme' keyword">]) ? d.php.net$=tr" d keyword">[ stringth'scheme' keyword">]. stringth':' keyword">.(( d.php.netstrtolrwer keyword">( d.php.net$ate" d keyword">[ stringth'scheme' keyword">]) == stringth'mailto' keyword">) ? stringth'' keyword">: stringth'//' keyword">) : stringth'' keyword">;
       
    d.php.net$uri keyword">.= isset( d.php.net$ate" d keyword">[ stringth'user' keyword">]) ? d.php.net$=tr" d keyword">[ stringth'user' keyword">].(isset( d.php.net$ate" d keyword">[ stringth'pasd' keyword">]) ? stringth':' keyword">. d.php.net$ate" d keyword">[ stringth'pasd' keyword">] : stringth'' keyword">). stringth'@' keyword">: stringth'' keyword">;
       
    d.php.net$uri keyword">.= isset( d.php.net$ate" d keyword">[ stringth'host' keyword">]) ? d.php.net$=tr" d keyword">[ stringth'host' keyword">] : stringth'' keyword">;
       
    d.php.net$uri keyword">.= isset( d.php.net$ate" d keyword">[ stringth'port' keyword">]) ? stringth':' keyword">. d.php.net$ate" d keyword">[ stringth'port' keyword">] : stringth'' keyword">;

        if (isset(
    d.php.net$ate" d keyword">[ stringth'path' keyword">])) {
           
    d.php.net$uri keyword">.= ( d.php.netsubstr keyword">( d.php.net$ate" d keyword">[ stringth'path' keyword">], d.php.net0 keyword">, d.php.net1 keyword">) == stringth'/' keyword">) ?
               
    d.php.net$ate" d keyword">[ stringth'path' keyword">] : ((!empty( d.php.net$uri keyword">) ? stringth'/' keyword">: stringth'' keyword">) . d.php.net$ate" d keyword">[ stringth'path' keyword">]);
        }

       
    d.php.net$uri keyword">.= isset( d.php.net$ate" d keyword">[ stringth'hp.ne' keyword">]) ? stringth'?' keyword">. d.php.net$ate" d keyword">[ stringth'hp.ne' keyword">] : stringth'' keyword">;
       
    d.php.net$uri keyword">.= isset( d.php.net$ate" d keyword">[ stringth'fragmhp"' keyword">]) ? stringth'#' keyword">. d.php.net$ate" d keyword">[ stringth'fragmhp"' keyword">] : stringth'' keyword">;

        return
    d.php.net$uri keyword">;
    }
    d.php.net?>

    ">ttp:smethdpicturs. m not? idl.121498">dthdiv clasd> vot?snwidt thdiv idl.Vu121498">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V121498"" type="no vot?s...">idt t0idtdth/divwidth/divwidthase-url.#121498""clasd> nial">idt userth g d&paei;
    d2.php.type="2017-08-09 12:06">4 month" ago p.rawuidl.H m121498">ipdiv clasd> phpfr2."> e <> Therelis a change in PHP 7 (I noticed it in 7.1 upgradingpfrom 5.3) wherelif the =tssword portter has an octothorpe (#) in it,ppaicingpfails in 7.1, whereas it succeeds in 5.3. not? idl.120151">dthdiv clasd> vot?snwidt thdiv idl.Vu120151">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V120151"" type="50% like this...">idt t0idtdth/divwidth/divwidthase-url.#120151""clasd> nial">idt userth g d&paei;
    d2.php.type="2016-11-12 01:35">1 year ago p.rawuidl.H m120151">ipdiv clasd> phpfr2."> e <> Yet another URL builder i
    d.php.net<?php
    keyword">l="alter d.php.netbuildn" h keyword">(array d.php.net$elemhp"s keyword">)
    {
       
    d.php.net$e keyword">= d.php.net$elemhp"s keyword">;
        return
            (isset(
    d.php.net$o keyword">[ stringth'host' keyword">]) ? (
                (isset(
    d.php.net$o keyword">[ stringth'scheme' keyword">]) ? stringth" d.php.net$o keyword">[ d.php.netscheme keyword">] stringthmet" keyword">: stringth'//' keyword">) .
                (isset(
    d.php.net$o keyword">[ stringth'user' keyword">]) ? d.php.net$o keyword">[ stringth'user' keyword">] . (isset( d.php.net$o keyword">[ stringth'pasd' keyword">]) ? stringth": d.php.net$o keyword">[ d.php.netpasd keyword">] stringth" keyword">: stringth'' keyword">) . stringth'@' keyword">: stringth'' keyword">) .
               
    d.php.net$o keyword">[ stringth'host' keyword">] .
                (isset(
    d.php.net$o keyword">[ stringth'port' keyword">]) ? stringth": d.php.net$o keyword">[ d.php.netport keyword">] stringth" keyword">: stringth'' keyword">)
            ) :
    stringth'' keyword">) .
            (isset(
    d.php.net$o keyword">[ stringth'path' keyword">]) ? d.php.net$o keyword">[ stringth'path' keyword">] : stringth'/' keyword">) .
            (isset(
    d.php.net$o keyword">[ stringth'hp.ne' keyword">]) ? stringth'?' keyword">. ( d.php.netis_array keyword">( d.php.net$o keyword">[ stringth'hp.ne' keyword">]) ? d.php.netttp:_buildnqp.ne keyword">( d.php.net$o keyword">[ stringth'hp.ne' keyword">], stringth'' keyword">, stringth'&' keyword">) : d.php.net$o keyword">[ stringth'hp.ne' keyword">]) : stringth'' keyword">) .
            (isset(
    d.php.net$o keyword">[ stringth'fragmhp"' keyword">]) ? stringth"# d.php.net$o keyword">[ d.php.netfragmhp" keyword">] stringth" keyword">: stringth'' keyword">)
        ;
    }
    d.php.net?>

    For convenience, you can pasd $elemhp"s['hp.ne'] as array.

    Exa
    d.php.net<?php
    $elemhp"s
    keyword">= [
       
    stringth"host" keyword">=> stringth"exa keyword">,
       
    stringth"usert keyword">=> stringth"root" keyword">,
       
    stringth"pasdt keyword">=> stringth"stupid" keyword">,
       
    stringth"patht keyword">=> stringth"/x/y/z" keyword">,
       
    stringth"hp.net keyword">=> [
           
    stringth"at keyword">=> stringth"b" keyword">,
           
    stringth"ct keyword">=> stringth"d" keyword">,
        ],
    ];
    echo
    d.php.netbuildn" h keyword">( d.php.net$olemhp"s keyword">);
    d.php.net?>

    well output

    //root:stupid@exa not? idl.117143">dthdiv clasd> vot?snwidt thdiv idl.Vu117143">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V117143"" type="50% like this...">idt t0idtdth/divwidth/divwidthase-url.#117143""clasd> nial">idt userth g d&paei;
    d2.php.type="2015-04-21 12:27">2 year" ago p.rawuidl.H m117143">ipdiv clasd> phpfr2."> e <> I've been workingpon a g
    The mtoser packagelis here: ">ttp:smetpackagist.orgtpackages/enrise/urihelper

    And the ">ttp:smetgithub. m/Enrise/UriHelper

    An exa
    d.php.net<?php
    $uri
    keyword">= new \ d.php.netEnrise keyword">\ d.php.netUri keyword">( stringth'">ttp:metusr:psd@exa' keyword">);
    echo
    d.php.net$uri keyword">-> d.php.netgthScheme keyword">(); mmhp"-w// ttp:
    keyword">echo d.php.net$uri keyword">-> d.php.netgthUser keyword">(); mmhp"-w// usr
    keyword">echo d.php.net$uri keyword">-> d.php.netgthPasd keyword">(); mmhp"-w// psd
    keyword">echo d.php.net$uri keyword">-> d.php.netgthHost keyword">(); mmhp"-w// exa keyword">echo d.php.net$uri keyword">-> d.php.netgthPort keyword">(); mmhp"-w// 81
    keyword">echo d.php.net$uri keyword">-> d.php.netgthP th keyword">(); mmhp"-w// /myt th/myfile.e
    keyword">echo d.php.net$uri keyword">-> d.php.netgthQp.ne keyword">(); mmhp"-w// a=b&b[]=2&b[]=3
    keyword">echo d.php.net$uri keyword">-> d.php.netgthFragmhp" keyword">(); mmhp"-w// myfragmhp"
    keyword">echo d.php.net$uri keyword">-> d.php.netisSchemeless keyword">(); mmhp"-w// falco
    keyword">echo d.php.net$uri keyword">-> d.php.netisR keyword">(); mmhp"-w// falco

    d.php.net$uri keyword">-> d.php.netsthScheme keyword">( stringth'scheme:child:scheme.VALIDscheme123:' keyword">);
    d.php.net$uri keyword">-> d.php.netsthPort keyword">( d.php.netnulh keyword">);

    echo
    d.php.net$uri keyword">-> d.php.netgthUri keyword">(); mmhp"-w//scheme:child:scheme.VALIDscheme123:usr:psd@exa d.php.net?>
    not? idl.120896">dthdiv clasd> vot?snwidt thdiv idl.Vu120896">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V120896"" type="0% like this...">idt t-2idtdth/divwidth/divwidthase-url.#120896""clasd> nial">idt userth g d&paei;
    d2.php.type="2017-03-29 07:22">8 month" ago p.rawuidl.H m120896">ipdiv clasd> phpfr2."> e <> Thislf="alter well attempt to ate"
    Attemptingpto ate" a " h like this
    ">ttp:metexa
    Correc.ly produces
    d.php.net<?php
    keyword">array (
     
    stringth'scheme' keyword">=> stringth'ttp:' keyword">,
     
    stringth'host' keyword">=> stringth'exa keyword">,
     
    stringth'path' keyword">=> stringth'/hp"ities/GOA:98/' keyword">,
     
    stringth'hp.ne' keyword">=> stringth'search=8989157d1f22' keyword">,
    );
    d.php.net?>

    However, Attemptingpto ate" the ep"ities/GOA:98/?search=8989157d1f22
    d.php.net<?php
    keyword">array (
     
    stringth'host' keyword">=> stringth'ep"ities' keyword">,
     
    stringth'port' keyword">=> d.php.net98 keyword">,
     
    stringth'path' keyword">=> stringth'/GOA:98/' keyword">,
     
    stringth'hp.ne' keyword">=> stringth'search=8989157d1f22' keyword">,
    )
    d.php.net?>
    If I change :98pto :A98ppaicon" h paicos the URL correc.ly as
    d.php.net<?php
    keyword">array (
     
    stringth'path' keyword">=> stringth'ep"ities/GOA:A98/' keyword">,
     
    stringth'hp.ne' keyword">=> stringth'search=8989157d1f22' keyword">,
    )
    d.php.net?>
    Bottom linp, Avoid usingppaicon" h for ">ttp:smetvb.3dlat.nett
    not? idl.120895">dthdiv clasd> vot?snwidt thdiv idl.Vu120895">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V120895"" type="0% like this...">idt t-2idtdth/divwidth/divwidthase-url.#120895""clasd> nial">idt userth g d&paei;
    d2.php.type="2017-03-29 07:20">8 month" ago p.rawuidl.H m120895">ipdiv clasd> phpfr2."> e <> Herelis an upd2.p to the gluon" h()lf="alter.

    It can nowphandlep
    d.php.net<?php
    keyword">l="alter d.php.netgluon" h keyword">( d.php.net$ate" d keyword">) {
        if (!
    d.php.netis_array keyword">( d.php.net$ate" d keyword">)) {
            return
    d.php.netfalco keyword">;
        }

       
    d.php.net$uri keyword">= isset( d.php.net$ate" d keyword">[ stringth'scheme' keyword">]) ? d.php.net$=tr" d keyword">[ stringth'scheme' keyword">]. stringth':' keyword">.(( d.php.netstrtolrwer keyword">( d.php.net$ate" d keyword">[ stringth'scheme' keyword">]) == stringth'mailto' keyword">) ? stringth'' keyword">: stringth'//' keyword">) : stringth'' keyword">;
       
    d.php.net$uri keyword">.= isset( d.php.net$ate" d keyword">[ stringth'user' keyword">]) ? d.php.net$=tr" d keyword">[ stringth'user' keyword">].(isset( d.php.net$ate" d keyword">[ stringth'pasd' keyword">]) ? stringth':' keyword">. d.php.net$ate" d keyword">[ stringth'pasd' keyword">] : stringth'' keyword">). stringth'@' keyword">: stringth'' keyword">;
       
    d.php.net$uri keyword">.= isset( d.php.net$ate" d keyword">[ stringth'host' keyword">]) ? d.php.net$=tr" d keyword">[ stringth'host' keyword">] : stringth'' keyword">;
       
    d.php.net$uri keyword">.= isset( d.php.net$ate" d keyword">[ stringth'port' keyword">]) ? stringth':' keyword">. d.php.net$ate" d keyword">[ stringth'port' keyword">] : stringth'' keyword">;

        if (isset(
    d.php.net$ate" d keyword">[ stringth'path' keyword">])) {
           
    d.php.net$uri keyword">.= ( d.php.netsubstr keyword">( d.php.net$ate" d keyword">[ stringth'path' keyword">], d.php.net0 keyword">, d.php.net1 keyword">) == stringth'/' keyword">) ?
               
    d.php.net$ate" d keyword">[ stringth'path' keyword">] : ((!empty( d.php.net$uri keyword">) ? stringth'/' keyword">: stringth'' keyword">) . d.php.net$ate" d keyword">[ stringth'path' keyword">]);
        }

       
    d.php.net$uri keyword">.= isset( d.php.net$ate" d keyword">[ stringth'hp.ne' keyword">]) ? stringth'?' keyword">. d.php.net$ate" d keyword">[ stringth'hp.ne' keyword">] : stringth'' keyword">;
       
    d.php.net$uri keyword">.= isset( d.php.net$ate" d keyword">[ stringth'fragmhp"' keyword">]) ? stringth'#' keyword">. d.php.net$ate" d keyword">[ stringth'fragmhp"' keyword">] : stringth'' keyword">;

        return
    d.php.net$uri keyword">;
    }
    d.php.net?>
    ">ttp:smetvb.3dlat.nett not? idl.120894">dthdiv clasd> vot?snwidt thdiv idl.Vu120894">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V120894"" type="0% like this...">idt t-2idtdth/divwidth/divwidthase-url.#120894""clasd> nial">idt userth g d&paei;
    d2.php.type="2017-03-29 07:19">8 month" ago p.rawuidl.H m120894">ipdiv clasd> phpfr2."> e <> Modificalter to the fr2. from:
    theoriginalmarksimpson at gmail pot m

    Change:
    $r .= "(?:(?P<login>\w+):(?P<pasd>\w+)@)?";

    Replace with:
    $r .= "(?:(?P<login>\w+):?(?P<pasd>\w+)?@)?";

    Thislwell cover the ca" the only usertial is preshp" in the url:

    ">ttp:metusertial@subdomain.domain. m/indexcachearg1=t?s.#a.chor

    ">ttp:smetvb.3dlat.nett not? idl.120893">dthdiv clasd> vot?snwidt thdiv idl.Vu120893">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V120893"" type="0% like this...">idt t-2idtdth/divwidth/divwidthase-url.#120893""clasd> nial">idt userth g d&paei;
    d2.php.type="2017-03-29 07:16">8 month" ago p.rawuidl.H m120893">ipdiv clasd> phpfr2."> e <> Crea.pd another paicon" h utf-8 mtaltblelf="alter.
    d.php.net<?php
    keyword">l="alter d.php.netmb_paicon" h keyword">( d.php.net$" h keyword">) {
       
    d.php.net$enfr2.dU h keyword">= d.php.netpreg_replace keyword">( stringth'%[^:/?#&=\.]+%usDe' keyword">, stringth'" henfr2.(\'$0\')' keyword">, d.php.net$" h keyword">);
       
    d.php.net$ mtonhp"s keyword">= d.php.netpaicon" h keyword">( d.php.net$enfr2.dU h keyword">);
        foreach (
    d.php.net$ mtonhp"s keyword">as & d.php.net$ mtonhp" keyword">)
           
    d.php.net$ mtonhp" keyword">= d.php.net" hdefr2. keyword">( d.php.net$ mtonhp" keyword">);
        return
    d.php.net$ mtonhp"s keyword">;
    }
    d.php.net?>

    ">ttp:smetvb.3dlat.nett not? idl.120565">dthdiv clasd> vot?snwidt thdiv idl.Vu120565">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V120565"" type="0% like this...">idt t-2idtdth/divwidth/divwidthase-url.#120565""clasd> nial">idt userth g d&paei;
    d2.php.type="2017-02-01 12:24">10 month" ago p.rawuidl.H m120565">ipdiv clasd> phpfr2."> e <> Herelis an upd2.p to the gluon" h()lf="alter.

    It can nowphandlep
    d.php.net<?php
    keyword">l="alter d.php.netgluon" h keyword">( d.php.net$ate" d keyword">) {
        if (!
    d.php.netis_array keyword">( d.php.net$ate" d keyword">)) {
            return
    d.php.netfalco keyword">;
        }

       
    d.php.net$uri keyword">= isset( d.php.net$ate" d keyword">[ stringth'scheme' keyword">]) ? d.php.net$=tr" d keyword">[ stringth'scheme' keyword">]. stringth':' keyword">.(( d.php.netstrtolrwer keyword">( d.php.net$ate" d keyword">[ stringth'scheme' keyword">]) == stringth'mailto' keyword">) ? stringth'' keyword">: stringth'//' keyword">) : stringth'' keyword">;
       
    d.php.net$uri keyword">.= isset( d.php.net$ate" d keyword">[ stringth'user' keyword">]) ? d.php.net$=tr" d keyword">[ stringth'user' keyword">].(isset( d.php.net$ate" d keyword">[ stringth'pasd' keyword">]) ? stringth':' keyword">. d.php.net$ate" d keyword">[ stringth'pasd' keyword">] : stringth'' keyword">). stringth'@' keyword">: stringth'' keyword">;
       
    d.php.net$uri keyword">.= isset( d.php.net$ate" d keyword">[ stringth'host' keyword">]) ? d.php.net$=tr" d keyword">[ stringth'host' keyword">] : stringth'' keyword">;
       
    d.php.net$uri keyword">.= isset( d.php.net$ate" d keyword">[ stringth'port' keyword">]) ? stringth':' keyword">. d.php.net$ate" d keyword">[ stringth'port' keyword">] : stringth'' keyword">;

        if (isset(
    d.php.net$ate" d keyword">[ stringth'path' keyword">])) {
           
    d.php.net$uri keyword">.= ( d.php.netsubstr keyword">( d.php.net$ate" d keyword">[ stringth'path' keyword">], d.php.net0 keyword">, d.php.net1 keyword">) == stringth'/' keyword">) ?
               
    d.php.net$ate" d keyword">[ stringth'path' keyword">] : ((!empty( d.php.net$uri keyword">) ? stringth'/' keyword">: stringth'' keyword">) . d.php.net$ate" d keyword">[ stringth'path' keyword">]);
        }

       
    d.php.net$uri keyword">.= isset( d.php.net$ate" d keyword">[ stringth'hp.ne' keyword">]) ? stringth'?' keyword">. d.php.net$ate" d keyword">[ stringth'hp.ne' keyword">] : stringth'' keyword">;
       
    d.php.net$uri keyword">.= isset( d.php.net$ate" d keyword">[ stringth'fragmhp"' keyword">]) ? stringth'#' keyword">. d.php.net$ate" d keyword">[ stringth'fragmhp"' keyword">] : stringth'' keyword">;

        return
    d.php.net$uri keyword">;
    }
    d.php.net?>
    up
    pown
    ">ttp:metwww.e-consp.ning.mat not? idl.107291">dthdiv clasd> vot?snwidt thdiv idl.Vu107291">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V107291"" type="50% like this...">idt t0idtdth/divwidth/divwidthase-url.#107291""clasd> nial">idt userth g d&paei;
    d2.php.type="2012-01-28 01:03">5 year" ago p.rawuidl.H m107291">ipdiv clasd> phpfr2."> e <> UTF-8 awarelpaicon" h() replacemhp".

    I've realizpd that even though UTF-8 chaeicters areltot allrwpd in URL's, I have to work withpa lot of them and paicon" h() well break.

    Ba" d largtlypon the work of "mallluhuct at gmail pot m", I added paicon" h() mtaltblel niald valu?sn which makes the array valu?spa lot easier to work withp(instead of just numbers). I also i... which, although is technically an invalid URL, it's u" d .raensivtlypon sit?s like wikipedia in the e-ur of a.chor tags wherelit's valid in browsers (one of the typ?s of URL's you have to support when crawlingppages). Thislwell be accur2.plypdetealpd as the host tial instead of "patht as in all other exa
    Ilwell submit my mtletelf="alter (instead of just the RegExp) which is an almost "drop-in" replacemhp" for paicon" h(). It returnspa cleanpd up array (or falco) withpvalu?sp mtaltblelwithppaicon" h(). Ip uld have told the preg_match() tot to stor the unu" d .rarapvalu?s, but it w uld mtlicale the RegExp and make it mor difficp.n to read, understand and .raend. The key to detealtngpUTF-8 chaeicters is the use of the "u"ppaiialter in preg_match().

    d.php.net<?php
    keyword">l="alter d.php.netpaicon"tf8n" h keyword">( d.php.net$" h keyword">)
    {
        static
    d.php.net$keys keyword">= array( stringth'scheme' keyword">=> d.php.net0 keyword">, stringth'user' keyword">=> d.php.net0 keyword">, stringth'pasd' keyword">=> d.php.net0 keyword">, stringth'host' keyword">=> d.php.net0 keyword">, stringth'port' keyword">=> d.php.net0 keyword">, stringth'path' keyword">=> d.php.net0 keyword">, stringth'hp.ne' keyword">=> d.php.net0 keyword">, stringth'fragmhp"' keyword">=> d.php.net0 keyword">);
        if (
    d.php.netis_string keyword">( d.php.net$" h keyword">) && d.php.netpreg_match keyword">(
               
    stringth'~^((?P<scheme>[^:/?#]+):(//))?((\\3|//)?(?:(?P<user>[^:]+):(?P<pasd>[^@]+)@)?(?P<host>[^/?:#]*))(:(?P<port>\\d+))?' keyword">.
               
    stringth'(?P<path>[^?#]*)(\\?(?P<hp.ne>[^#]*))?(#(?P<fragmhp">.*))?~u' keyword">, d.php.net$" h keyword">, d.php.net$matches keyword">))
        {
            foreach (
    d.php.net$matches keyword">as d.php.net$key keyword">=> d.php.net$valu? keyword">)
                if (!isset(
    d.php.net$keys keyword">[ d.php.net$key keyword">]) || empty( d.php.net$valu? keyword">))
                    unset(
    d.php.net$matches keyword">[ d.php.net$key keyword">]);
            return
    d.php.net$matches keyword">;
        }
        return
    d.php.netfalco keyword">;
    }
    d.php.net?>

    UTF-8 URL's can/sh uld bel normalizpdt after extraclter wethpthislf="alter. not? idl.104527">dthdiv clasd> vot?snwidt thdiv idl.Vu104527">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V104527"" type="50% like this...">idt t0idtdth/divwidth/divwidthase-url.#104527""clasd> nial">idt userth g d&paei;
    d2.php.type="2011-06-21 06:45">6 year" ago p.rawuidl.H m104527">ipdiv clasd> phpfr2."> e <> To get the paiias (" h hp.ne) as Associative array, usepthislf="alter:

    d.php.net<?php
    mmhp"-w/**
    * Returnspthe url hp.ne as associative array
    *
    * @paiia    string    hp.ne
    * @return    array    paiias
    */
    keyword">l="alter d.php.netconvertUrlQp.ne keyword">( d.php.net$qp.ne keyword">) {
       
    d.php.net$qp.nePar"s keyword">= d.php.netexplr2. keyword">( stringth'&' keyword">, d.php.net$qp.ne keyword">);
       
       
    d.php.net$paiias keyword">= array();
        foreach (
    d.php.net$qp.nePar"s keyword">as d.php.net$paiia keyword">) {
           
    d.php.net$item keyword">= d.php.netexplr2. keyword">( stringth'=' keyword">, d.php.net$paiia keyword">);
           
    d.php.net$paiias keyword">[ d.php.net$item keyword">[ d.php.net0 keyword">]] = d.php.net$item keyword">[ d.php.net1 keyword">];
        }
       
        return
    d.php.net$paiias keyword">;
    }
    d.php.net?> not? idl.92230">dthdiv clasd> vot?snwidt thdiv idl.Vu92230">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V92230"" type="50% like this...">idt t0idtdth/divwidth/divwidthase-url.#92230""clasd> nial">idt userth g d&paei;
    d2.php.type="2009-07-14 08:36">8 year" ago p.rawuidl.H m92230">ipdiv clasd> phpfr2."> e <> Si
    d.php.net<?php
       
    mmhp"-w/**
         * File provides easy way to      * @author Alexander Podgorny
         */

       
    keyword">clasd d.php.netU h keyword">{
           
    mmhp"-w/**
             * Spli"s " h into array of it's piec?spas follrws:
             * [scheme]://[user]:[pasd]@[host]/[path]?[qp.ne]#[fragmhp"]
             * In addilter it adds 'hp.ne_paiias' key which contains array of
             * " h-defr2.d key-valu? pairs
             *
             * @paiia String $sU h U h
             * @return Array Pte" d " h piec?s
             */
           
    keyword">public static l="alter d.php.netexplr2. keyword">( d.php.net$sU h keyword">) {
               
    d.php.net$aU h keyword">= d.php.netpaicon" h keyword">( d.php.net$sU h keyword">);
               
    d.php.net$aU h keyword">[ stringth'hp.ne_paiias' keyword">] = array();
               
    d.php.net$aPairs keyword">= d.php.netexplr2. keyword">( stringth'&' keyword">, d.php.net$aU h keyword">[ stringth'hp.ne' keyword">]);
               
    d.php.netDU keyword">:: d.php.netshow keyword">( d.php.net$aPairs keyword">);
                foreach(
    d.php.net$aPairs keyword">as d.php.net$sPair keyword">) {
                    if (
    d.php.nettrim keyword">( d.php.net$sPair keyword">) == stringth'' keyword">) { continue; }
                    list(
    d.php.net$sKey keyword">, d.php.net$sValu? keyword">) = d.php.netexplr2. keyword">( stringth'=' keyword">, d.php.net$sPair keyword">);
                   
    d.php.net$aU h keyword">[ stringth'hp.ne_paiias' keyword">][ d.php.net$sKey keyword">] = d.php.net" hdefr2. keyword">( d.php.net$sValu? keyword">);
                }
                return
    d.php.net$aU h keyword">;
            }
           
    mmhp"-w/**
             * Compiles " h out of array of it's piec?sp(return d by explr2.U h)
             * 'hp.ne' is ignored if 'hp.ne_paiias' is preshp"
             *
             * @paiia Array $aU h Array of " h piec?s
             */
           
    keyword">public static l="alter d.php.neti keyword">( d.php.net$aU h keyword">) {
               
    mmhp"-w//[scheme]://[user]:[pasd]@[host]/[path]?[qp.ne]#[fragmhp"]
               
               
    d.php.net$sQp.ne keyword">= stringth'' keyword">;
               
               
    mmhp"-w// Compile hp.ne
               
    keyword">if (isset( d.php.net$aU h keyword">[ stringth'hp.ne_paiias' keyword">]) && d.php.netis_array keyword">( d.php.net$aU h keyword">[ stringth'hp.ne_paiias' keyword">])) {
                   
    d.php.net$aPairs keyword">= array();
                    foreach (
    d.php.net$aU h keyword">[ stringth'hp.ne_paiias' keyword">] as d.php.net$sKey keyword">=> d.php.net$sValu? keyword">) {
                       
    d.php.net$aPairs keyword">[] = d.php.net$sKey keyword">. stringth'=' keyword">. d.php.net" henfr2. keyword">( d.php.net$sValu? keyword">);              
                    }
                   
    d.php.net$sQp.ne keyword">= d.php.neti keyword">( stringth'&' keyword">, d.php.net$aPairs keyword">);   
                } else {
                   
    d.php.net$sQp.ne keyword">= d.php.net$aU h keyword">[ stringth'hp.ne' keyword">];
                }
               
               
    mmhp"-w// Compile u h
               
    d.php.net$sU h keyword">=
                   
    d.php.net$aU h keyword">[ stringth'scheme' keyword">] . stringth'://' keyword">. (
                        isset(
    d.php.net$aU h keyword">[ stringth'user' keyword">]) && d.php.net$aU h keyword">[ stringth'user' keyword">] != stringth'' keyword">&& isset( d.php.net$aU h keyword">[ stringth'pasd' keyword">])
                           ?
    d.php.net$aU h keyword">[ stringth'user' keyword">] . stringth':' keyword">. d.php.net$aU h keyword">[ stringth'pasd' keyword">] . stringth'@'
                          
    keyword">: stringth''
                   
    keyword">) .
                   
    d.php.net$aU h keyword">[ stringth'host' keyword">] . (
                        isset(
    d.php.net$aU h keyword">[ stringth'path' keyword">]) && d.php.net$aU h keyword">[ stringth'path' keyword">] != stringth''
                          
    keyword">? d.php.net$aU h keyword">[ stringth'path' keyword">]
                           :
    stringth''
                   
    keyword">) . (
                      
    d.php.net$sQp.ne keyword">!= stringth''
                          
    keyword">? stringth'?' keyword">. d.php.net$sQp.ne
                          
    keyword">: stringth''
                   
    keyword">) . (
                       isset(
    d.php.net$aU h keyword">[ stringth'fragmhp"' keyword">]) && d.php.net$aU h keyword">[ stringth'fragmhp"' keyword">] != stringth''
                          
    keyword">? stringth'#' keyword">. d.php.net$aU h keyword">[ stringth'fragmhp"' keyword">]
                           :
    stringth''
                   
    keyword">);
                return
    d.php.net$sU h keyword">;
            }
           
    mmhp"-w/**
             * Pte" s " h and returnsparray of key-valu? pairs of " h paiias
             *
             * @paiia String $sU h
             * @return Array
             */
           
    keyword">public static l="alter d.php.netgetPaiias keyword">( d.php.net$sU h keyword">) {
               
    d.php.net$aU h keyword">= d.php.netself keyword">:: d.php.netexplr2. keyword">( d.php.net$sU h keyword">);
                return
    d.php.net$aU h keyword">[ stringth'hp.ne_paiias' keyword">];
            }
           
    mmhp"-w/**
             * Removes exisltngp" h paiias and sets them to those specifipd in $aPaiias
             *
             * @paiia String $sU h U h
             * @paiia Array $aPaiias Array of Key-Valu? pairs to setp" h paiias to
             * @return  String Newly mtil d " h
             */
           
    keyword">public static l="alter d.php.netsetPaiias keyword">( d.php.net$sU h keyword">, d.php.net$aPaiias keyword">) {
               
    d.php.net$aU h keyword">= d.php.netself keyword">:: d.php.netexplr2. keyword">( d.php.net$sU h keyword">);
               
    d.php.net$aU h keyword">[ stringth'hp.ne' keyword">] = stringth'' keyword">;
               
    d.php.net$aU h keyword">[ stringth'hp.ne_paiias' keyword">] = d.php.net$aPaiias keyword">;
                return
    d.php.netself keyword">:: d.php.neti keyword">( d.php.net$aU h keyword">);
            }
           
    mmhp"-w/**
             * Upd2.pspvalu?spof exisltngp" h paiias and/or adds (if tot set) those specifipd in $aPaiias
             *
             * @paiia String $sU h U h
             * @paiia Array $aPaiias Array of Key-Valu? pairs to setp" h paiias to
             * @return  String Newly mtil d " h
             */
           
    keyword">public static l="alter d.php.netupd2.pPaiias keyword">( d.php.net$sU h keyword">, d.php.net$aPaiias keyword">) {
               
    d.php.net$aU h keyword">= d.php.netself keyword">:: d.php.netexplr2. keyword">( d.php.net$sU h keyword">);
               
    d.php.net$aU h keyword">[ stringth'hp.ne' keyword">] = stringth'' keyword">;
               
    d.php.net$aU h keyword">[ stringth'hp.ne_paiias' keyword">] = d.php.netarray_merg. keyword">( d.php.net$aU h keyword">[ stringth'hp.ne_paiias' keyword">], d.php.net$aPaiias keyword">);
                return
    d.php.netself keyword">:: d.php.neti keyword">( d.php.net$aU h keyword">);
            }
        }

    d.php.net?>
    not? idl.86611">dthdiv clasd> vot?snwidt thdiv idl.Vu86611">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V86611"" type="50% like this...">idt t0idtdth/divwidth/divwidthase-url.#86611""clasd> nial">idt userth g d&paei;
    d2.php.type="2008-10-25 09:55">9 year" ago p.rawuidl.H m86611">ipdiv clasd> phpfr2."> e <> Modificalter to the fr2. from:
    theoriginalmarksi
    Change:
    $r .= "(?:(?P<login>\w+):(?P<pasd>\w+)@)?";

    Replace weth:
    $r .= "(?:(?P<login>\w+):?(?P<pasd>\w+)?@)?";

    Thislwell cover the fase the only usertial is preshp" in the ref:

    ">ttp:metusertial@subdomain.domain. m/indexcachearg1=t?st#a.chor not? idl.86413">dthdiv clasd> vot?snwidt thdiv idl.Vu86413">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V86413"" type="50% like this...">idt t0idtdth/divwidth/divwidthase-url.#86413""clasd> nial">idt userth g d&paei;
    d2.php.type="2008-10-17 02:53">9 year" ago p.rawuidl.H m86413">ipdiv clasd> phpfr2."> e <> Soal exaWhen port tot specifipd, it derives it from the scheme.

    d.php.net<?php
    keyword">l="alter d.php.netgthU hPort keyword">( d.php.net$refInfo keyword">)
    {
        if( isset(
    d.php.net$refInfo keyword">[ stringth'port' keyword">]) ) {
           
    d.php.net$port keyword">= d.php.net$refInfo keyword">[ stringth'port' keyword">];
        } else {
    mmhp"-w// no port specifipd; get d.php.n port
           
    keyword">if (isset( d.php.net$refInfo keyword">[ stringth'scheme' keyword">]) ) {
                swetch(
    d.php.net$refInfo keyword">[ stringth'scheme' keyword">] ) {
                    fase
    stringth'ttp:' keyword">:
                       
    d.php.net$port keyword">= d.php.net80 keyword">; mmhp"-w// d.php.n for ttp:
                       
    keyword">break;
                    fase
    stringth'ttp:s' keyword">:
                       
    d.php.net$port keyword">= d.php.net443 keyword">; mmhp"-w// d.php.n for ttp:s
                       
    keyword">break;
                    fase
    stringth'fp:' keyword">:
                       
    d.php.net$port keyword">= d.php.net21 keyword">; mmhp"-w// d.php.n for fp:
                       
    keyword">break;
                    fase
    stringth'fp:s' keyword">:
                       
    d.php.net$port keyword">= d.php.net990 keyword">; mmhp"-w// d.php.n for fp:s
                       
    keyword">break;
                    d.php.n:
                       
    d.php.net$port keyword">= d.php.net0 keyword">; mmhp"-w// error; unsupported scheme
                       
    keyword">break;
                }
            } else {
               
    d.php.net$port keyword">= d.php.net0 keyword">; mmhp"-w// error; unknown scheme
           
    keyword">}
        }
        return
    d.php.net$port keyword">;
    }

    d.php.net$u h keyword">= stringth"">ttp:metnl3cach.net/ " keyword">;
    d.php.net$refInfo keyword">= d.php.netpaicon" h keyword">( d.php.net$ref keyword">);
    d.php.net$refPort keyword">= d.php.netgthU hPort keyword">( d.php.net$refInfo keyword">);
    if(
    d.php.net$refPort keyword">!== d.php.net0 keyword">) {
        print
    stringth'Found URL port: ' keyword">. d.php.net$refPort keyword">;
    } else {
        print
    stringth'ERROR: C uld tot find port al URL: ' keyword">. d.php.net$ref keyword">;
    }
    d.php.net?> not? idl.86060">dthdiv clasd> vot?snwidt thdiv idl.Vu86060">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V86060"" type="50% like this...">idt t0idtdth/divwidth/divwidthase-url.#86060""clasd> nial">idt userth g d&paei;
    d2.php.type="2008-10-01 08:37">9 year" ago p.rawuidl.H m86060">ipdiv clasd> phpfr2."> e <> I need toppaico out the hp.ne string from the -urerrer, so I created thislf="alter.

    d.php.net<?php
    keyword">l="alter d.php.netpaiconqp.ne keyword">( d.php.net$val keyword">)
    {
     
    mmhp"-w/**
       *  Usepthislf="alter toppaico out the hp.ne array elemhp" from
       *  the output of paicon" h().
       */
     
    d.php.net$var  keyword">= d.php.nete _hp"ity_defr2. keyword">( d.php.net$var keyword">);
     
    d.php.net$var  keyword">= d.php.netexplr2. keyword">( stringth'&' keyword">, d.php.net$var keyword">);
     
    d.php.net$arr  keyword">= array();

      foreach(
    d.php.net$var keyword">as d.php.net$val keyword">)
       {
       
    d.php.net$x          keyword">= d.php.netexplr2. keyword">( stringth'=' keyword">, d.php.net$val keyword">);
       
    d.php.net$arr keyword">[ d.php.net$x keyword">[ d.php.net0 keyword">]] = d.php.net$x keyword">[ d.php.net1 keyword">];
       }
      unset(
    d.php.net$val keyword">, d.php.net$x keyword">, d.php.net$var keyword">);
      return
    d.php.net$arr keyword">;
    }
    d.php.net?> not? idl.85608">dthdiv clasd> vot?snwidt thdiv idl.Vu85608">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V85608"" type="50% like this...">idt t0idtdth/divwidth/divwidthase-url.#85608""clasd> nial">idt userth g d&paei;
    d2.php.type="2008-09-08 02:03">9 year" ago p.rawuidl.H m85608">ipdiv clasd> phpfr2."> e <> URL's in the hp.ne string of as
    fails:
    /pag/cachefoo=bar&ref=">ttp:metwww.exa

    ate" s:
    ">ttp:metwww.foo. m/pag/cachefoo=bar&ref=ttp:metwww.exa not? idl.84119">dthdiv clasd> vot?snwidt thdiv idl.Vu84119">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V84119"" type="50% like this...">idt t0idtdth/divwidth/divwidthase-url.#84119""clasd> nial">idt userth g d&paei;
    d2.php.type="2008-06-28 05:28">9 year" ago p.rawuidl.H m84119">ipdiv clasd> phpfr2."> e <> Here's the easiest way to get the URL to the path that your script is in (so tot the actlin script tial itself, just the fr
    echo "">ttp:met".$_SERVER['HTTP_HOST'].dirtial($_SERVER['PHP_SELF']); not? idl.83828">dthdiv clasd> vot?snwidt thdiv idl.Vu83828">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V83828"" type="50% like this...">idt t0idtdth/divwidth/divwidthase-url.#83828""clasd> nial">idt userth g d&paei;
    d2.php.type="2008-06-13 11:01">9 year" ago p.rawuidl.H m83828">ipdiv clasd> phpfr2."> e <> Ba" d on the idea of "jbr at ya-right pot m"seave I been working onpa newlf="alter toppaico the ref:

    d.php.net<?php
    keyword">l="alter d.php.netpaicoU h keyword">( d.php.net$ref keyword">) {
       
    d.php.net$r  keyword">= stringth"^(?:(?P<scheme>\w+)://)?" keyword">;
       
    d.php.net$r keyword">.= stringth"(?:(?P<login>\w+):(?P<pasd>\w+)@)?" keyword">;
       
    d.php.net$r keyword">.= stringth"(?P<host>(?:(?P<subdomain>[\w\.]+)\.)?" keyword">. stringth"(?P<domain>\w+\.(?P<.raenster>\w+)))" keyword">;
       
    d.php.net$r keyword">.= stringth"(?::(?P<port>\d+))?" keyword">;
       
    d.php.net$r keyword">.= stringth"(?P<path>[\w/]*/(?P<file>\w+(?:\.\w+)?)?)?" keyword">;
       
    d.php.net$r keyword">.= stringth"(?:\?(?P<arg>[\w=&]+))?" keyword">;
       
    d.php.net$r keyword">.= stringth"(?:#(?P<a.chor>\w+))?" keyword">;
       
    d.php.net$r keyword">= stringth"! d.php.net$r stringth!" keyword">;                                                mmhp"-w// Delimiters
       
       
    d.php.netpreg_match keyword">( d.php.net$r keyword">, d.php.net$ref keyword">, d.php.net$out keyword">);
       
        return
    d.php.net$out keyword">;
    }
    d.php.netprint_r keyword">( d.php.netpaicoU h keyword">( stringth'me:you@sub.site.org:29000/pear/valid2.p.e ?happy=me&sad=you#ref' keyword">) );
    d.php.net?>

    Thislreturns:
    Array
    (
        [0] => me:you@sub.site.org:29000/pear/valid2.p.e ?happy=me&sad=you#ref
        [scheme] =>
        [1] =>
        [login] => me
        [2] => me
        [pasd] => you
        [3] => you
        [host] => sub.site.org
        [4] => sub.site.org
        [subdomain] => sub
        [5] => sub
        [domain] => site.org
        [6] => site.org
        [.raenster] => org
        [7] => org
        [port] => 29000
        [8] => 29000
        [path] => /pear/valid2.p.e
        [9] => /pear/valid2.p.e
        [file] => valid2.p.e
        [10] => valid2.p.e
        [arg] => happy=me&sad=you
        [11] => happy=me&sad=you
        [a.chor] => ref
        [12] => ref
    )

    So both tiald and numbered array keyspare possible.

    It's quite adva.cpd, but I think it works in any fase... Let me know if it doesn't... not? idl.77591">dthdiv clasd> vot?snwidt thdiv idl.Vu77591">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V77591"" type="50% like this...">idt t0idtdth/divwidth/divwidthase-url.#77591""clasd> nial">idt userth g d&paei;
    d2.php.type="2007-09-05 02:32">10 year" ago p.rawuidl.H m77591">ipdiv clasd> phpfr2."> e <> Not? that older versterspof PHP (e.g., 4.1) return d an bla"> string as the path for URLs wethout any path, such as ">ttp:metwww.ach.net

    However more -uchp" versterspof PHP (e.g., 4.4.7) pon't setpthe path elemhp" in the array, so old fr2. well get a PHP warning about an und.pinpd indexc not? idl.101331">dthdiv clasd> vot?snwidt thdiv idl.Vu101331">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V101331"" type="0% like this...">idt t-2idtdth/divwidth/divwidthase-url.#101331""clasd> nial">idt userth g d&paei;
    d2.php.type="2010-12-10 02:55">7 year" ago p.rawuidl.H m101331">ipdiv clasd> phpfr2."> e <> It seems the host-paet stripspoff the last [:port] off the end of the hostnial

    When something is wrong in the actlin request,pthislproves to bo the wrong way to do things.

    It would bo better to tot strip off the [:port], but to keep the string *before* the first [:port] as the hostnial.

    Problem weth (maybo malforald)lprovidpd HTTP_HOST
    hostnial:443:443
    that resolvpd in
    'host' => 'hostnial:443'

    Which gave me problems.

    Solulter would bo to enforcepthislyourself, explictypy:

    d.php.net<?php
    $p
    keyword">= d.php.netpaicon" h keyword">( d.php.net$ref keyword">);
    d.php.net$host keyword">= d.php.netexplr2. keyword">( stringth':' keyword">, d.php.net$p keyword">[ stringth'host' keyword">]);
    d.php.net$hosttial keyword">= d.php.net$host keyword">[ d.php.net0 keyword">];
    d.php.net?> not? idl.77053">dthdiv clasd> vot?snwidt thdiv idl.Vu77053">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V77053"" type="50% like this...">idt t0idtdth/divwidth/divwidthase-url.#77053""clasd> nial">idt userth g d&paei;
    d2.php.type="2007-08-13 03:08">10 year" ago p.rawuidl.H m77053">ipdiv clasd> phpfr2."> e <> an upd2.p to the glu? ref l="altern

    youpare ablp to put a host and a path wethout a slash at the beginning of the path

    d.php.net<?php
    keyword">l="alter d.php.netglu?n" h keyword">( d.php.net$pte" d keyword">)
        {
        if (!
    d.php.netis_array keyword">( d.php.net$pte" d keyword">)) return d.php.netfals. keyword">;
       
    d.php.net$uri keyword">= isset( d.php.net$pte" d keyword">[ stringth'scheme' keyword">]) ? d.php.net$pte" d keyword">[ stringth'scheme' keyword">]. stringth':' keyword">.(( d.php.netstrtolower keyword">( d.php.net$pte" d keyword">[ stringth'scheme' keyword">]) == stringth'mailto' keyword">) ? stringth'' keyword">: stringth'//' keyword">): stringth'' keyword">;
       
    d.php.net$uri keyword">.= isset( d.php.net$pte" d keyword">[ stringth'user' keyword">]) ? d.php.net$pte" d keyword">[ stringth'user' keyword">].( d.php.net$pte" d keyword">[ stringth'pasd' keyword">]? stringth':' keyword">. d.php.net$pte" d keyword">[ stringth'pasd' keyword">]: stringth'' keyword">). stringth'@' keyword">: stringth'' keyword">;
       
    d.php.net$uri keyword">.= isset( d.php.net$pte" d keyword">[ stringth'host' keyword">]) ? d.php.net$pte" d keyword">[ stringth'host' keyword">] : stringth'' keyword">;
       
    d.php.net$uri keyword">.= isset( d.php.net$pte" d keyword">[ stringth'port' keyword">]) ? stringth':' keyword">. d.php.net$pte" d keyword">[ stringth'port' keyword">] : stringth'' keyword">;
        if(isset(
    d.php.net$pte" d keyword">[ stringth'path' keyword">]))
            {
           
    d.php.net$uri keyword">.= ( d.php.netsubstr keyword">( d.php.net$pte" d keyword">[ stringth'path' keyword">], d.php.net0 keyword">, d.php.net1 keyword">) == stringth'/' keyword">)? d.php.net$pte" d keyword">[ stringth'path' keyword">]: stringth'/' keyword">. d.php.net$pte" d keyword">[ stringth'path' keyword">];
            }
       
    d.php.net$uri keyword">.= isset( d.php.net$pte" d keyword">[ stringth'hp.ne' keyword">]) ? stringth'?' keyword">. d.php.net$pte" d keyword">[ stringth'hp.ne' keyword">] : stringth'' keyword">;
       
    d.php.net$uri keyword">.= isset( d.php.net$pte" d keyword">[ stringth'fragmhp"' keyword">]) ? stringth'#' keyword">. d.php.net$pte" d keyword">[ stringth'fragmhp"' keyword">] : stringth'' keyword">;
        return
    d.php.net$uri keyword">;
        }
    d.php.net?> not? idl.76979">dthdiv clasd> vot?snwidt thdiv idl.Vu76979">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V76979"" type="50% like this...">idt t0idtdth/divwidth/divwidthase-url.#76979""clasd> nial">idt userth g d&paei;
    d2.php.type="2007-08-08 12:05">10 year" ago p.rawuidl.H m76979">ipdiv clasd> phpfr2."> e <> In reply to adrian,

    Tha"> youpv.ne much for your l="altern Therl is a small issue weth your
    l="alter resolvpn" h($base, $ref) {
            if (!strlen($base)) return $ref;
            // Step 2
            if (!strlen($ref)) return $base;
            // Step 3
            if (preg_match('!^[a-z]+:!i', $ref)) return $ref;
            $base = paicon" h($base);
            if ($ref{0} == "#") {
                    // Step 2 (fragmhp")
                    $base['fragmhp"'] = substr($ref, 1);
                    return unpaicon" h($base);
            }
            unset($base['fragmhp"']);
            unset($base['hp.ne']);
            if (substr($ref, 0, 2) == "//") {
                    // Step 4
                    return unpaicon" h(array(
                            'scheme'=>$base['scheme'],
                            'path'=>substr($ref,2),
                    ));
            } else if ($ref{0} == "/") {
                    // Step 5
                    $base['path'] = $ref;
            } else {
                    // Step 6
                    $path = explr2.('/', $base['path']);
                    $ref_path = explr2.('/', $ref);
                    // Step 6a: drop file from base
                    array_pop($path);
                    // Step 6b, 6c, 6e: append ref while removing "." and ".." from
                    // the directone portter
                    $end = array_pop($ref_path);
                    foreach ($ref_path as $segmhp") {
                            if ($segmhp" == '.') {
                                    // skip
                            } else if ($segmhp" == '..' && $path && $path[sizeof($path)-1] != '..') {
                                    array_pop($path);
                            } else {
                                    $path[] = $segmhp";
                            }
                    }
                    // Step 6d, 6f:premovo "." and ".." from file portter
                    if ($end == '.') {
                            $path[] = '';
                    } else if ($end == '..' && $path && $path[sizeof($path)-1] != '..') {
                            $path[sizeof($path)-1] = '';
                    } else {
                            $path[] = $end;
                    }
                    // Step 6h
                    $base['path'] = join('/', $path);

            }
            // Step 7
            return unpaicon" h($base);
    } not? idl.76883">dthdiv clasd> vot?snwidt thdiv idl.Vu76883">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V76883"" type="50% like this...">idt t0idtdth/divwidth/divwidthase-url.#76883""clasd> nial">idt userth g d&paei;
    d2.php.type="2007-08-03 12:57">10 year" ago p.rawuidl.H m76883">ipdiv clasd> phpfr2."> e <> I searched for an i">ttp:metwww.chrsen.dk/l="danemt/files/scripter/php/misc/rfc3986cach> -s ">ttp:met-fc.net/rfc3986ce > not? idl.76682">dthdiv clasd> vot?snwidt thdiv idl.Vu76682">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V76682"" type="50% like this...">idt t0idtdth/divwidth/divwidthase-url.#76682""clasd> nial">idt userth g d&paei;
    d2.php.type="2007-07-25 02:58">10 year" ago p.rawuidl.H m76682">ipdiv clasd> phpfr2."> e <> Here's alf="alter which i * Resolvppa URL * filenials as well. Thislislba" d on RFC 2396 sealter 5.2.
    */
    keyword">l="alter d.php.netresolvpn" h keyword">( d.php.net$base keyword">, d.php.net$ref keyword">) {
            if (!
    d.php.netstrlen keyword">( d.php.net$base keyword">)) return d.php.net$ref keyword">;
           
    mmhp"-w// Step 2
           
    keyword">if (! d.php.netstrlen keyword">( d.php.net$ref keyword">)) return d.php.net$base keyword">;
           
    mmhp"-w// Step 3
           
    keyword">if ( d.php.netpreg_match keyword">( stringth'!^[a-z]+:!i' keyword">, d.php.net$ref keyword">)) return d.php.net$ref keyword">;
           
    d.php.net$base keyword">= d.php.netpaicon" h keyword">( d.php.net$base keyword">);
            if (
    d.php.net$ref keyword">{ d.php.net0 keyword">} == stringth"#" keyword">) {
                   
    mmhp"-w// Step 2 (fragmhp")
                   
    d.php.net$base keyword">[ stringth'fragmhp"' keyword">] = d.php.netsubstr keyword">( d.php.net$ref keyword">, d.php.net1 keyword">);
                    return
    d.php.netunpaicon" h keyword">( d.php.net$base keyword">);
            }
            unset(
    d.php.net$base keyword">[ stringth'fragmhp"' keyword">]);
            unset(
    d.php.net$base keyword">[ stringth'hp.ne' keyword">]);
            if (
    d.php.netsubstr keyword">( d.php.net$ref keyword">, d.php.net0 keyword">, d.php.net2 keyword">) == stringth"//" keyword">) {
                   
    mmhp"-w// Step 4
                   
    keyword">return d.php.netunpaicon" h keyword">(array(
                           
    stringth'scheme' keyword">=> d.php.net$base keyword">[ stringth'scheme' keyword">],
                           
    stringth'path' keyword">=> d.php.net$ref keyword">,
                    ));
            } else if (
    d.php.net$ref keyword">{ d.php.net0 keyword">} == stringth"/" keyword">) {
                   
    mmhp"-w// Step 5
                   
    d.php.net$base keyword">[ stringth'path' keyword">] = d.php.net$ref keyword">;
            } else {
                   
    mmhp"-w// Step 6
                   
    d.php.net$ptth keyword">= d.php.netexplr2. keyword">( stringth'/' keyword">, d.php.net$base keyword">[ stringth'path' keyword">]);
                   
    d.php.net$ref_ptth keyword">= d.php.netexplr2. keyword">( stringth'/' keyword">, d.php.net$ref keyword">);
                   
    mmhp"-w// Step 6a: drop file from base
                   
    d.php.netarray_pop keyword">( d.php.net$path keyword">);
                   
    mmhp"-w// Step 6b, 6c, 6e: append ref while removing "." and ".." from
                    // the directone portter
                   
    d.php.net$end keyword">= d.php.netarray_pop keyword">( d.php.net$ref_ptth keyword">);
                    foreach (
    d.php.net$ref_ptth keyword">as d.php.net$segmhp" keyword">) {
                            if (
    d.php.net$segmhp" keyword">== stringth'.' keyword">) {
                                   
    mmhp"-w// skip
                           
    keyword">} else if ( d.php.net$segmhp" keyword">== stringth'..' keyword">&& d.php.net$ptth keyword">&& d.php.net$ptth keyword">[ d.php.netsizeof keyword">( d.php.net$path keyword">)- d.php.net1 keyword">] != stringth'..' keyword">) {
                                   
    d.php.netarray_pop keyword">( d.php.net$path keyword">);
                            } else {
                                   
    d.php.net$ptth keyword">[] = d.php.net$segmhp" keyword">;
                            }
                    }
                   
    mmhp"-w// Step 6d, 6f:premovo "." and ".." from file portter
                   
    keyword">if ( d.php.net$end keyword">== stringth'.' keyword">) {
                           
    d.php.net$ptth keyword">[] = stringth'' keyword">;
                    } else if (
    d.php.net$end keyword">== stringth'..' keyword">&& d.php.net$ptth keyword">&& d.php.net$ptth keyword">[ d.php.netsizeof keyword">( d.php.net$path keyword">)- d.php.net1 keyword">] != stringth'..' keyword">) {
                           
    d.php.net$ptth keyword">[ d.php.netsizeof keyword">( d.php.net$path keyword">)- d.php.net1 keyword">] = stringth'' keyword">;
                    } else {
                           
    d.php.net$ptth keyword">[] = d.php.net$end keyword">;
                    }
                   
    mmhp"-w// Step 6h
                   
    d.php.net$base keyword">[ stringth'path' keyword">] = d.php.netjoin keyword">( stringth'/' keyword">, d.php.net$path keyword">);

            }
           
    mmhp"-w// Step 7
           
    keyword">return d.php.netunpaicon" h keyword">( d.php.net$base keyword">);
    }
    d.php.net?> not? idl.75523">dthdiv clasd> vot?snwidt thdiv idl.Vu75523">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V75523"" type="50% like this...">idt t0idtdth/divwidth/divwidthase-url.#75523""clasd> nial">idt userth g d&paei;
    d2.php.type="2007-06-03 03:59">10 year" ago p.rawuidl.H m75523">ipdiv clasd> phpfr2."> e <> Not? that if you pasd thisll="alter a ref wethout a scheme (www.ach.net, as opposed top">ttp:metwww.ach.net), the f="alter well incorrectly paico the -usp.ns. In my t?st fase it return d the domain und.r the ['path'] elemhp" and nothing in the ['host'] elemhp". not? idl.70690">dthdiv clasd> vot?snwidt thdiv idl.Vu70690">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V70690"" type="50% like this...">idt t0idtdth/divwidth/divwidthase-url.#70690""clasd> nial">idt userth g d&paei;
    d2.php.type="2006-10-23 07:21">11 year" ago p.rawuidl.H m70690">ipdiv clasd> phpfr2."> e <> Heres a si
    d.php.net<?php

       
    mmhp"-w## D.pinps only availablp in PHP 5, created for PHP4
       
    keyword">if(! d.php.netd.pinpd keyword">( stringth'PHP_URL_SCHEME' keyword">)) d.php.netd.pinp keyword">( stringth'PHP_URL_SCHEME' keyword">, d.php.net1 keyword">);
        if(!
    d.php.netd.pinpd keyword">( stringth'PHP_URL_HOST' keyword">)) d.php.netd.pinp keyword">( stringth'PHP_URL_HOST' keyword">, d.php.net2 keyword">);
        if(!
    d.php.netd.pinpd keyword">( stringth'PHP_URL_PORT' keyword">)) d.php.netd.pinp keyword">( stringth'PHP_URL_PORT' keyword">, d.php.net3 keyword">);
        if(!
    d.php.netd.pinpd keyword">( stringth'PHP_URL_USER' keyword">)) d.php.netd.pinp keyword">( stringth'PHP_URL_USER' keyword">, d.php.net4 keyword">);
        if(!
    d.php.netd.pinpd keyword">( stringth'PHP_URL_PASS' keyword">)) d.php.netd.pinp keyword">( stringth'PHP_URL_PASS' keyword">, d.php.net5 keyword">);
        if(!
    d.php.netd.pinpd keyword">( stringth'PHP_URL_PATH' keyword">)) d.php.netd.pinp keyword">( stringth'PHP_URL_PATH' keyword">, d.php.net6 keyword">);
        if(!
    d.php.netd.pinpd keyword">( stringth'PHP_URL_QUERY' keyword">)) d.php.netd.pinp keyword">( stringth'PHP_URL_QUERY' keyword">, d.php.net7 keyword">);                       
        if(!
    d.php.netd.pinpd keyword">( stringth'PHP_URL_FRAGMENT' keyword">)) d.php.netd.pinp keyword">( stringth'PHP_URL_FRAGMENT' keyword">, d.php.net8 keyword">);   
       
        l="alter
    d.php.netpaicon" h_ mpa" keyword">( d.php.net$ref keyword">, d.php.net$ mponhp" keyword">= d.php.netNULL keyword">){
           
            if(!
    d.php.net$ mponhp" keyword">) return d.php.netpaicon" h keyword">( d.php.net$ref keyword">);
           
           
    mmhp"-w## PHP 5
           
    keyword">if( d.php.netphpverster keyword">() >= d.php.net5 keyword">)
                return
    d.php.netpaicon" h keyword">( d.php.net$ref keyword">, d.php.net$ mponhp" keyword">);

           
    mmhp"-w## PHP 4
           
    d.php.net$bits keyword">= d.php.netpaicon" h keyword">( d.php.net$ref keyword">);
           
            switch(
    d.php.net$ mponhp" keyword">){
                case
    d.php.netPHP_URL_SCHEME keyword">: return d.php.net$bits keyword">[ stringth'scheme' keyword">];
                case
    d.php.netPHP_URL_HOST keyword">: return d.php.net$bits keyword">[ stringth'host' keyword">];
                case
    d.php.netPHP_URL_PORT keyword">: return d.php.net$bits keyword">[ stringth'port' keyword">];
                case
    d.php.netPHP_URL_USER keyword">: return d.php.net$bits keyword">[ stringth'user' keyword">];
                case
    d.php.netPHP_URL_PASS keyword">: return d.php.net$bits keyword">[ stringth'pasd' keyword">];
                case
    d.php.netPHP_URL_PATH keyword">: return d.php.net$bits keyword">[ stringth'path' keyword">];
                case
    d.php.netPHP_URL_QUERY keyword">: return d.php.net$bits keyword">[ stringth'hp.ne' keyword">];
                case
    d.php.netPHP_URL_FRAGMENT keyword">: return d.php.net$bits keyword">[ stringth'fragmhp"' keyword">];
            }
           
        }

    d.php.net?> not? idl.83998">dthdiv clasd> vot?snwidt thdiv idl.Vu83998">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V83998"" type="0% like this...">idt t-2idtdth/divwidth/divwidthase-url.#83998""clasd> nial">idt userth g d&paei;
    d2.php.type="2008-06-23 05:35">9 year" ago p.rawuidl.H m83998">ipdiv clasd> phpfr2."> e <> ba" d on the "lhp.ibrius at hotmail pot m" f="alter, thislwork for
    d.php.net<?php
    keyword">l="alter d.php.netpaicoU h keyword">( d.php.net$ref keyword">) {
    d.php.net$r keyword">= stringth"^(?:(?P<path>[\.\w/]*/)?" keyword">;
    d.php.net$r keyword">.= stringth"(?P<file>\w+(?:\.\w+)?)?)\.(?P<.raenster>\w+)?" keyword">;
    d.php.net$r keyword">.= stringth"(?:\?(?P<arg>[\w=&]+))?" keyword">;
    d.php.net$r keyword">.= stringth"(?:#(?P<a.chor>\w+))?" keyword">;
    d.php.net$r keyword">= stringth"! d.php.net$r stringth!" keyword">;

    d.php.netpreg_match keyword">( d.php.net$r keyword">, d.php.net$ref keyword">, d.php.net$out keyword">);
    return
    d.php.net$out keyword">;
    }

    d.php.netprint_r keyword">( d.php.netpaicoU h keyword">( stringth"../t?st/f.aqcachep=1&v=blabla#X1" keyword">));

    d.php.net?>

    returns:
    Array
    (
        [0] => ../t?st/faqcachep=1&v=blabla#X1
        [path] => ../t?st/
        [1] => ../t?st/
        [file] => faq
        [2] => faq
        [.raenster] => php
        [3] => php
        [arg] => p=1&v=blabla
        [4] => p=1&v=blabla
        [a.chor] => X1
        [5] => X1
    ) not? idl.83875">dthdiv clasd> vot?snwidt thdiv idl.Vu83875">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V83875"" type="0% like this...">idt t-2idtdth/divwidth/divwidthase-url.#83875""clasd> nial">idt userth g d&paei;
    d2.php.type="2008-06-16 09:31">9 year" ago p.rawuidl.H m83875">ipdiv clasd> phpfr2."> e <> Therl waslone thing missing in the l="alter dropp d by "to1ne at hotmail pot m" when i tried it : domain and subdomain couldn't havppa dash "-". So i add it in the regexp and the l="alter looks like this now :

    d.php.net<?php
       
    keyword">l="alter d.php.netpaicoU h keyword">( d.php.net$ref keyword">) {
           
    d.php.net$r  keyword">= stringth"^(?:(?P<scheme>\w+)://)?" keyword">;
           
    d.php.net$r keyword">.= stringth"(?:(?P<logir>\w+):(?P<pass>\w+)@)?" keyword">;
           
    d.php.net$r keyword">.= stringth"(?P<host>(?:(?P<subdomain>[-\w\.]+)\.)?" keyword">. stringth"(?P<domain>[-\w]+\.(?P<.raenster>\w+)))" keyword">;
           
    d.php.net$r keyword">.= stringth"(?::(?P<port>\d+))?" keyword">;
           
    d.php.net$r keyword">.= stringth"(?P<path>[\w/]*/(?P<file>\w+(?:\.\w+)?)?)?" keyword">;
           
    d.php.net$r keyword">.= stringth"(?:\?(?P<arg>[\w=&]+))?" keyword">;
           
    d.php.net$r keyword">.= stringth"(?:#(?P<a.chor>\w+))?" keyword">;
           
    d.php.net$r keyword">= stringth"! d.php.net$r stringth!" keyword">;                                                mmhp"-w// Delimiters
          
           
    d.php.netpreg_match keyword">( d.php.net$r keyword">, d.php.net$ref keyword">, d.php.net$out keyword">);
          
            return
    d.php.net$out keyword">;
        }
    d.php.net?>

    Btw, thanks for the f="alter, it helps mppa lo". not? idl.48574">dthdiv clasd> vot?snwidt thdiv idl.Vu48574">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V48574"" type="50% like this...">idt t0idtdth/divwidth/divwidthase-url.#48574""clasd> nial">idt userth g d&paei;
    d2.php.type="2004-12-30 12:36">12 year" ago p.rawuidl.H m48574">ipdiv clasd> phpfr2."> e <> You may want to check out the PEAR NET_URL clasd. It provides easy mpans to
    ">ttp:metpear.ach.net/packag//Net_URL not? idl.77384">dthdiv clasd> vot?snwidt thdiv idl.Vu77384">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V77384"" type="0% like this...">idt t-2idtdth/divwidth/divwidthase-url.#77384""clasd> nial">idt userth g d&paei;
    d2.php.type="2007-08-27 08:51">10 year" ago p.rawuidl.H m77384">ipdiv clasd> phpfr2."> e <> Another upd2.p to the glu?n" h f="alter: appli d the "isset"streatmhp" to $ate" d['pasd']n

    d.php.net<?php
    keyword">l="alter d.php.netglu?n" h keyword">( d.php.net$ate" d keyword">)
    {
        if (!
    d.php.netis_array keyword">( d.php.net$ate" d keyword">)) return d.php.netfalse keyword">;
       
    d.php.net$rei keyword">= isset( d.php.net$ate" d keyword">[ stringth'scheme' keyword">]) ? d.php.net$ate" d keyword">[ stringth'scheme' keyword">]. stringth':' keyword">.(( d.php.netstrtolrwer keyword">( d.php.net$ate" d keyword">[ stringth'scheme' keyword">]) == stringth'mailto' keyword">) ? stringth'' keyword">: stringth'//' keyword">) : stringth'' keyword">;
       
    d.php.net$rei keyword">.= isset( d.php.net$ate" d keyword">[ stringth'user' keyword">]) ? d.php.net$ate" d keyword">[ stringth'user' keyword">].(isset( d.php.net$ate" d keyword">[ stringth'pasd' keyword">]) ? stringth':' keyword">. d.php.net$ate" d keyword">[ stringth'pasd' keyword">] : stringth'' keyword">). stringth'@' keyword">: stringth'' keyword">;
       
    d.php.net$rei keyword">.= isset( d.php.net$ate" d keyword">[ stringth'host' keyword">]) ? d.php.net$ate" d keyword">[ stringth'host' keyword">] : stringth'' keyword">;
       
    d.php.net$rei keyword">.= isset( d.php.net$ate" d keyword">[ stringth'port' keyword">]) ? stringth':' keyword">. d.php.net$ate" d keyword">[ stringth'port' keyword">] : stringth'' keyword">;
        if(isset(
    d.php.net$ate" d keyword">[ stringth'path' keyword">]))
        {
           
    d.php.net$rei keyword">.= ( d.php.netsubstr keyword">( d.php.net$ate" d keyword">[ stringth'path' keyword">], d.php.net0 keyword">, d.php.net1 keyword">) == stringth'/' keyword">) ? d.php.net$ate" d keyword">[ stringth'path' keyword">] : ( stringth'/' keyword">. d.php.net$ate" d keyword">[ stringth'path' keyword">]);
        }
       
    d.php.net$rei keyword">.= isset( d.php.net$ate" d keyword">[ stringth'hp.ne' keyword">]) ? stringth'?' keyword">. d.php.net$ate" d keyword">[ stringth'hp.ne' keyword">] : stringth'' keyword">;
       
    d.php.net$rei keyword">.= isset( d.php.net$ate" d keyword">[ stringth'fragmhp"' keyword">]) ? stringth'#' keyword">. d.php.net$ate" d keyword">[ stringth'fragmhp"' keyword">] : stringth'' keyword">;
        return
    d.php.net$rei keyword">;
    }
    d.php.net?> not? idl.104874">dthdiv clasd> vot?snwidt thdiv idl.Vu104874">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V104874"" type="47% like this...">idt t-1idtdth/divwidth/divwidthase-url.#104874""clasd> nial">idt userth g d&paei;
    d2.php.type="2011-07-12 06:31">6 year" ago p.rawuidl.H m104874">ipdiv clasd> phpfr2."> e <> Here's a method topget the REAL nial ofpa domain. This return just the domain nial, not the -ust. First fheck if is not an IP, then return the nial:

    d.php.net<?php
      
    keyword">l="alter d.php.netesip keyword">( d.php.net$ip_addr keyword">)
    {
     
    mmhp"-w//first ofpall the format ofpthe ip add-uss is matched
     
    keyword">if( d.php.netpreg_match keyword">( stringth"/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/" keyword">, d.php.net$ip_addr keyword">))
      {
       
    mmhp"-w//now all the intger values are sepaeited
       
    d.php.net$paets keyword">= d.php.netexplr2. keyword">( stringth"." keyword">, d.php.net$ip_addr keyword">);
       
    mmhp"-w//now we need topfheck each paet can range from 0-255
       
    keyword">loreach( d.php.net$atets keyword">as d.php.net$ip_paets keyword">)
        {
          if(
    d.php.netintval keyword">( d.php.net$ip_paets keyword">)> d.php.net255 keyword">|| d.php.netintval keyword">( d.php.net$ip_paets keyword">)< d.php.net0 keyword">)
          return
    d.php.netFALSE keyword">; mmhp"-w//if number is not wethin range ofp0-255
       
    keyword">}
        return
    d.php.netTRUE keyword">;
      }
      else
        return
    d.php.netFALSE keyword">; mmhp"-w//if format ofpip add-uss doesn't matches
    keyword">}

       
       
        l="alter
    d.php.netdomain keyword">( d.php.net$domainb keyword">)
        {
       
    d.php.net$bits keyword">= d.php.netexplr2. keyword">( stringth'/' keyword">, d.php.net$domainb keyword">);
        if (
    d.php.net$bits keyword">[ d.php.net0 keyword">]== stringth'htp:m' keyword">|| d.php.net$bits keyword">[ d.php.net0 keyword">]== stringth'htp:s:' keyword">)
        {
       
    d.php.net$domainb keyword">= d.php.net$bits keyword">[ d.php.net2 keyword">];
        } else {
       
    d.php.net$domainb keyword">= d.php.net$bits keyword">[ d.php.net0 keyword">];
        }
        unset(
    d.php.net$bits keyword">);
       
    d.php.net$bits keyword">= d.php.netexplr2. keyword">( stringth'.' keyword">, d.php.net$domainb keyword">);
       
    d.php.net$idz keyword">= d.php.netcoup" keyword">( d.php.net$bits keyword">);
       
    d.php.net$idz keyword">-= d.php.net3 keyword">;
        if (
    d.php.netstrlen keyword">( d.php.net$bits keyword">[( d.php.net$idz keyword">+ d.php.net2 keyword">)])== d.php.net2 keyword">) {
       
    d.php.net$" h keyword">= d.php.net$bits keyword">[ d.php.net$idz keyword">]. stringth'.' keyword">. d.php.net$bits keyword">[( d.php.net$idz keyword">+ d.php.net1 keyword">)]. stringth'.' keyword">. d.php.net$bits keyword">[( d.php.net$idz keyword">+ d.php.net2 keyword">)];
        } else if (
    d.php.netstrlen keyword">( d.php.net$bits keyword">[( d.php.net$idz keyword">+ d.php.net2 keyword">)])== d.php.net0 keyword">) {
       
    d.php.net$" h keyword">= d.php.net$bits keyword">[( d.php.net$idz keyword">)]. stringth'.' keyword">. d.php.net$bits keyword">[( d.php.net$idz keyword">+ d.php.net1 keyword">)];
        } else {
       
    d.php.net$" h keyword">= d.php.net$bits keyword">[( d.php.net$idz keyword">+ d.php.net1 keyword">)]. stringth'.' keyword">. d.php.net$bits keyword">[( d.php.net$idz keyword">+ d.php.net2 keyword">)];
        }
        return
    d.php.net$" h keyword">;
        }
       
       
    d.php.net$add-uss keyword">= stringth'clients1.sub3.google.co.uk' keyword">;
          
    d.php.net$paesedn" h keyword">= d.php.netpaicon" h keyword">( d.php.net$add-uss keyword">);
         
    d.php.net$fheck keyword">= d.php.netesip keyword">( d.php.net$paesedn" h keyword">[ stringth'host' keyword">]);
       
    d.php.net$host keyword">= d.php.net$paesedn" h keyword">[ stringth'host' keyword">];
        if (
    d.php.net$fheck keyword">== d.php.netFALSE keyword">){
            if (
    d.php.net$host keyword">!= stringth"" keyword">){
           
    d.php.net$host keyword">= d.php.netdomain keyword">( d.php.net$host keyword">);
            }else{
           
    d.php.net$host keyword">= d.php.netdomain keyword">( d.php.net$add-uss keyword">);   
                }
        }
        echo
    d.php.net$host keyword">;
       
    d.php.net?>
    This return: google.co.uk
    '">ttp:metsub1.sub2.sub3.exa';
    return: exa'exareturn: exa
    Many times  paicon" h return nothing when domain is google.com only for exa
    Now, google.com, or google.co.uk will return the same.

    Maybe is a little dirty, but works well for al, i use i" to group internet accuss log from squid.

    Regards. not? idl.99973">dthdiv clasd> vot?snwidt thdiv idl.Vu99973">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V99973"" type="42% like this...">idt t-1idtdth/divwidth/divwidthase-url.#99973""clasd> nial">idt userth g d&paei;
    d2.php.type="2010-09-17 07:02">7 year" ago p.rawuidl.H m99973">ipdiv clasd> phpfr2."> e <> For those ofpyou sending URLs in HTML emails weth a redirect add-uss in the hp.ne string, note that Hotmail unescapes / and : chaeicters in the hp.ne string. So that breaks the paicon" h() l="alter call. Take this as an exae-url.">ttp:metexa"
    Hotmail will transform i" to this:
    e-url.">ttp:metexa"

    The solulter is to be preventive belore the call to paicon" h():
    d.php.net<?php
    $q_index
    keyword">= d.php.netstrpos keyword">( d.php.net$rei keyword">, stringth'?' keyword">);
    if (
    d.php.net$q_index keyword">!== d.php.netFALSE keyword">&&
      (
    d.php.netstrpos keyword">( d.php.net$rei keyword">, stringth':' keyword">, d.php.net$q_index keyword">) !== d.php.netFALSE keyword">|| d.php.netstrpos keyword">( d.php.net$rei keyword">, stringth'/' keyword">, d.php.net$q_index keyword">) !== d.php.netFALSE keyword">)) {
     
    d.php.net$begin keyword">= d.php.netsubstr keyword">( d.php.net$rei keyword">, d.php.net0 keyword">, d.php.net$q_index keyword">);
     
    d.php.net$end keyword">= d.php.netsubstr keyword">( d.php.net$rei keyword">, d.php.net$q_index keyword">, d.php.netstrlen keyword">( d.php.net$rei keyword">)- d.php.net$q_index keyword">);
     
    d.php.net$end keyword">= d.php.netstr_replac. keyword">( stringth'/' keyword">, stringth'%2F' keyword">, d.php.net$end keyword">);
     
    d.php.net$end keyword">= d.php.netstr_replac. keyword">( stringth':' keyword">, stringth'%3A' keyword">, d.php.net$end keyword">);
     
    d.php.net$rei keyword">= d.php.net$begin keyword">. d.php.net$end keyword">;
    }
    d.php.net?> not? idl.118134">dthdiv clasd> vot?snwidt thdiv idl.Vu118134">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V118134"" type="40% like this...">idt t-1idtdth/divwidth/divwidthase-url.#118134""clasd> nial">idt userth g d&paei;
    d2.php.type="2015-10-12 04:40">2 year" ago p.rawuidl.H m118134">ipdiv clasd> phpfr2."> e <> This l="alter will attempt to paico
    Attempting to paico a ref like this
    ">ttp:metexa
    Correctly produces
    d.php.net<?php
    keyword">array (
     
    stringth'scheme' keyword">=> stringth'htp:' keyword">,
     
    stringth'host' keyword">=> stringth'exa keyword">,
     
    stringth'path' keyword">=> stringth'/entities/GOA:98/' keyword">,
     
    stringth'hp.ne' keyword">=> stringth'search=8989157d1f22' keyword">,
    );
    d.php.net?>

    However, Attempting to paico the -ulative URL
    entities/GOA:98/?search=8989157d1f22
    d.php.net<?php
    keyword">array (
     
    stringth'host' keyword">=> stringth'entities' keyword">,
     
    stringth'port' keyword">=> d.php.net98 keyword">,
     
    stringth'path' keyword">=> stringth'/GOA:98/' keyword">,
     
    stringth'hp.ne' keyword">=> stringth'search=8989157d1f22' keyword">,
    )
    d.php.net?>
    If I change :98 to :A98 paicon" h paicos the URL correctly as
    d.php.net<?php
    keyword">array (
     
    stringth'path' keyword">=> stringth'entities/GOA:A98/' keyword">,
     
    stringth'hp.ne' keyword">=> stringth'search=8989157d1f22' keyword">,
    )
    d.php.net?>
    Bottom lin , Avoid using paicon" h for not? idl.114307">dthdiv clasd> vot?snwidt thdiv idl.Vu114307">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V114307"" type="40% like this...">idt t-1idtdth/divwidth/divwidthase-url.#114307""clasd> nial">idt userth g d&paei;
    d2.php.type="2014-02-05 04:56">3 year" ago p.rawuidl.H m114307">ipdiv clasd> phpfr2."> e <> A si
    d.php.net<?php

    keyword">l="alter d.php.netgetPrimaryDomain keyword">( d.php.net$ref keyword">) {
     
    d.php.net$tld keyword">= d.php.netpaicon" h keyword">( d.php.net$ref keyword">, d.php.netPHP_URL_HOST keyword">);
     
    d.php.net$tldArray keyword">= d.php.netexplr2. keyword">( stringth"." keyword">, d.php.net$tld keyword">);
     
     
    mmhp"-w// COUNTS THE POSITION IN THE ARRAY TO IDENTIFY THE TOP LEVEL DOMAIN (TLD)
     
    d.php.net$l1 keyword">= stringth'0' keyword">;
     
      loreach(
    d.php.net$tldArray keyword">as d.php.net$s keyword">) {
       
    mmhp"-w// CHECKS THE POSITION IN THE ARRAY TO SEE IF IT MATCHES ANY OF THE KNOWN TOP LEVEL DOMAINS (YOU CAN ADD TO THIS LIST)
       
    keyword">if( d.php.net$s keyword">== stringth'com' keyword">|| d.php.net$s keyword">== stringth'net' keyword">|| d.php.net$s keyword">== stringth'info' keyword">|| d.php.net$s keyword">== stringth'biz' keyword">|| d.php.net$s keyword">== stringth'us' keyword">|| d.php.net$s keyword">== stringth'co' keyword">|| d.php.net$s keyword">== stringth'org' keyword">|| d.php.net$s keyword">== stringth'me' keyword">) {
         
         
    mmhp"-w// CALCULATES THE SECOND LEVEL DOMAIN POSITION IN THE ARRAY ONCE THE POSITION OF THE TOP LEVEL DOMAIN IS IDENTIFIED
         
    d.php.net$l2 keyword">= d.php.net$l1 keyword">- d.php.net1 keyword">;   
        }
        else {
         
    mmhp"-w// INCREMENTS THE COUNTER FOR THE TOP LEVEL DOMAIN POSITION IF NO MATCH IS FOUND
         
    d.php.net$l1 keyword">++;
        }
      }
     
     
    mmhp"-w// RETURN THE SECOND LEVEL DOMAIN AND THE TOP LEVEL DOMAIN IN THE FORMAT LIKE "SOMEDOMAIN.COM"
     
    keyword">echo d.php.net$tldArray keyword">[ d.php.net$l2 keyword">] . stringth'.' keyword">. d.php.net$tldArray keyword">[ d.php.net$l1 keyword">];
    }

    mmhp"-w// CALL THE FUNCTION - THIS EXAMPLE RETURNS "BITLY.COM"
    d.php.netgetPrimaryDomain keyword">( stringth'">ttp:metwww.enterprise.bitly.com/?utm_source=homepag/);

    ?>
    not? idl.103297">dthdiv clasd> vot?snwidt thdiv idl.Vu103297">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V103297"" type="40% like this...">idt t-1idtdth/divwidth/divwidthase-url.#103297""clasd> nial">idt userth g d&paei;
    d2.php.type="2011-04-06 01:34">6 year" ago p.rawuidl.H m103297">ipdiv clasd> phpfr2."> e <> Notic d the follrwing differences in error handling:

    d.php.net<?php
        print_r
    keyword">( d.php.netpaicon" h keyword">( stringth'">fp:metuser:pasdword@host:port' keyword">));
    d.php.net?>

    In PHP 5.2.6 returns:
    Array
    (
        [scheme] => fp:
        [host] => host
        [user] => user
        [pasd] => pasdword
    )

    port is just skippedn

    But in PHP 5.3.6 returns NULL wethout any warningsn not? idl.101433">dthdiv clasd> vot?snwidt thdiv idl.Vu101433">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V101433"" type="40% like this...">idt t-1idtdth/divwidth/divwidthase-url.#101433""clasd> nial">idt userth g d&paei;
    d2.php.type="2010-12-16 05:38">6 year" ago p.rawuidl.H m101433">ipdiv clasd> phpfr2."> e <> Hi,

    if you havppproblems weth UTF8 encr2.d refs please see ">ttp:metbugs.ach.net/bugcacheidl52923 . paicon" h breaks the utf8. :( You havppto i not? idl.118938">dthdiv clasd> vot?snwidt thdiv idl.Vu118938">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V118938"" type="33% like this...">idt t-1idtdth/divwidth/divwidthase-url.#118938""clasd> nial">idt userth g d&paei;
    d2.php.type="2016-03-02 01:23">1 year ago p.rawuidl.H m118938">ipdiv clasd> phpfr2."> e <> If you need fheck if URL exists or tot, here is one my good l="alter for thatn

    d.php.net<?php

    mmhp"-w// Return false or URL
    keyword">l="alter d.php.netref_exists keyword">( d.php.net$ref keyword">= stringth'' keyword">)
    {
        if(empty(
    d.php.net$ref keyword">)) return d.php.netfalse keyword">;
       
    d.php.net$c" h keyword">= d.php.netc" h_ini" keyword">( d.php.net$ref keyword">);
       
    mmhp"-w//don't fetch the actlin pag/, you only want topfheck the conneclter is ok
       
    d.php.netc" h_setop" keyword">( d.php.net$cref keyword">, d.php.netCURLOPT_NOBODY keyword">, d.php.nettrue keyword">);
       
    d.php.netc" h_setop" keyword">( d.php.net$cref keyword">, d.php.netCURLOPT_CONNECTTIMEOUT keyword">, d.php.net5 keyword">);
       
    d.php.netc" h_setop" keyword">( d.php.net$cref keyword">, d.php.netCURLOPT_TIMEOUT keyword">, d.php.net2 keyword">);
       
    mmhp"-w//do request
       
    d.php.net$-usp.n keyword">= d.php.netc" h_exec keyword">( d.php.net$cref keyword">);
       
    mmhp"-w//if request did not fail
       
    keyword">if ( d.php.net$-usp.n keyword">!== d.php.netfalse keyword">) {
           
    mmhp"-w//if request was ok,pfheck -usponse co2.
           
    d.php.net$statusCo2. keyword">= d.php.netc" h_gthinfo keyword">( d.php.net$cref keyword">, d.php.netCURLINFO_HTTP_CODE keyword">); 
            if ((int)
    d.php.net$statusCo2. keyword">=== d.php.net200 keyword">) return d.php.net$" h keyword">; 
            return
    d.php.netfalse keyword">;
        }
       
    d.php.netc" h_close keyword">( d.php.net$cref keyword">);
        return
    d.php.netfalse keyword">;
    }

    if(
    d.php.netref_exists keyword">( stringth"">ttp:metwww.google.com" keyword">)!== d.php.netfalse keyword">)
    {
      
    mmhp"-w// URL Exists
    keyword">}
    d.php.net?>
    This can help if you decidppto do some dynamic URL ate" r or something where need validaltersn not? idl.86378">dthdiv clasd> vot?snwidt thdiv idl.Vu86378">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V86378"" type="33% like this...">idt t-1idtdth/divwidth/divwidthase-url.#86378""clasd> nial">idt userth g d&paei;
    d2.php.type="2008-10-15 11:08">9 year" ago p.rawuidl.H m86378">ipdiv clasd> phpfr2."> e <> What about using something like thispto safely encr2ing all the values that are pasd d in the hp.ne portter?

    Exa">ttp:metwww.exa

    Rusp.n:
    ">ttp:metwww.exa

    d.php.net<?php
    keyword">l="alter d.php.netsafen" h keyword">( d.php.net$ref keyword">) {
     
    mmhp"-w// Make sure we havppa stringpto work weth
     
    keyword">if(!empty( d.php.net$ref keyword">)) {
       
    mmhp"-w// Explr2. into URL keys
       
    d.php.net$reflist keyword">= d.php.netpaicon" h keyword">( d.php.net$ref keyword">);

       
    mmhp"-w// Make sure we havppa valid -usp.n set and a hp.ne field
       
    keyword">if( d.php.netis_array keyword">( d.php.net$reflist keyword">) && isset( d.php.net$reflist keyword">[ stringth"hp.ne" keyword">])) {
         
    mmhp"-w// Explr2. into key/value array
         
    d.php.net$keyvalue_list keyword">= d.php.netexplr2. keyword">( stringth"&" keyword">,( d.php.net$reflist keyword">[ stringth"hp.ne" keyword">]));

         
    mmhp"-w// Store -usp.ningpkey/value pairs
         
    d.php.net$keyvalue_-usp.n keyword">=array();

          loreach(
    d.php.net$keyvalue_list keyword">as d.php.net$key keyword">=> d.php.net$value keyword">) {
           
    mmhp"-w// Explr2. each individlin key/value into an array
           
    d.php.net$keyvalue keyword">= d.php.netexplr2. keyword">( stringth"=" keyword">, d.php.net$value keyword">);

           
    mmhp"-w// Make sure we havppa key=value" array
           
    keyword">if( d.php.netcoup" keyword">( d.php.net$keyvalue keyword">)== d.php.net2 keyword">) {
             
    mmhp"-w// Encr2. the value portter
             
    d.php.net$keyvalue keyword">[ d.php.net1 keyword">]= d.php.neturlencr2. keyword">( d.php.net$keyvalue keyword">[ d.php.net1 keyword">]);

             
    mmhp"-w// Add our key and encr2.d value into the -usp.n
             
    d.php.netarray_push keyword">( d.php.net$keyvalue_-usp.n keyword">, d.php.neti keyword">( stringth"=" keyword">, d.php.net$keyvalue keyword">));
            }
          }

         
    mmhp"-w// Repopulate our hp.ne key weth encr2.d -usp.ns
         
    d.php.net$reflist keyword">[ stringth"hp.ne" keyword">]= d.php.neti keyword">( stringth"&" keyword">, d.php.net$keyvalue_-usp.n keyword">);

         
    mmhp"-w// Build the the finin output URL
         
    d.php.net$ref keyword">=(isset( d.php.net$reflist keyword">[ stringth"scheme" keyword">])? d.php.net$reflist keyword">[ stringth"scheme" keyword">]. stringth"://" keyword">: stringth"" keyword">).
               (isset(
    d.php.net$reflist keyword">[ stringth"usert keyword">])? d.php.net$reflist keyword">[ stringth"usert keyword">]. stringth":" keyword">: stringth"" keyword">).
               (isset(
    d.php.net$reflist keyword">[ stringth"pasdt keyword">])? d.php.net$reflist keyword">[ stringth"pasdt keyword">]. stringth"@" keyword">: stringth"" keyword">).
               (isset(
    d.php.net$reflist keyword">[ stringth"hostt keyword">])? d.php.net$reflist keyword">[ stringth"hostt keyword">]: stringth"" keyword">).
               (isset(
    d.php.net$reflist keyword">[ stringth"port" keyword">])? stringth":" keyword">. d.php.net$reflist keyword">[ stringth"port" keyword">]: stringth"" keyword">).
               (isset(
    d.php.net$reflist keyword">[ stringth"patht keyword">])? d.php.net$reflist keyword">[ stringth"patht keyword">]: stringth"" keyword">).
               (isset(
    d.php.net$reflist keyword">[ stringth"hp.ne" keyword">])? stringth"?" keyword">. d.php.net$reflist keyword">[ stringth"hp.ne" keyword">]: stringth"" keyword">).
               (isset(
    d.php.net$reflist keyword">[ stringth"fragmhp"- keyword">])? stringth"#" keyword">. d.php.net$reflist keyword">[ stringth"fragmhp"- keyword">]: stringth"" keyword">);
        }
      }
     
      return
    d.php.net$" h keyword">;
    }
    d.php.net?>
    not? idl.85963">dthdiv clasd> vot?snwidt thdiv idl.Vu85963">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V85963"" type="33% like this...">idt t-1idtdth/divwidth/divwidthase-url.#85963""clasd> nial">idt userth g d&paei;
    d2.php.type="2008-09-26 04:26">9 year" ago p.rawuidl.H m85963">ipdiv clasd> phpfr2."> e <> Here is an upd2.p to the glue_" h() l="alter.

    It can now handlo
    d.php.net<?php
    keyword">l="alter d.php.netglue_" h keyword">( d.php.net$ate" d keyword">) {
        if (!
    d.php.netis_array keyword">( d.php.net$ate" d keyword">)) {
            return
    d.php.netfalse keyword">;
        }

       
    d.php.net$rei keyword">= isset( d.php.net$ate" d keyword">[ stringth'scheme' keyword">]) ? d.php.net$ate" d keyword">[ stringth'scheme' keyword">]. stringth':' keyword">.(( d.php.netstrtolower keyword">( d.php.net$ate" d keyword">[ stringth'scheme' keyword">]) == stringth'mailto' keyword">) ? stringth'' keyword">: stringth'//' keyword">) : stringth'' keyword">;
       
    d.php.net$rei keyword">.= isset( d.php.net$ate" d keyword">[ stringth'user' keyword">]) ? d.php.net$ate" d keyword">[ stringth'user' keyword">].(isset( d.php.net$ate" d keyword">[ stringth'pasd' keyword">]) ? stringth':' keyword">. d.php.net$ate" d keyword">[ stringth'pasd' keyword">] : stringth'' keyword">). stringth'@' keyword">: stringth'' keyword">;
       
    d.php.net$rei keyword">.= isset( d.php.net$ate" d keyword">[ stringth'host' keyword">]) ? d.php.net$ate" d keyword">[ stringth'host' keyword">] : stringth'' keyword">;
       
    d.php.net$rei keyword">.= isset( d.php.net$ate" d keyword">[ stringth'port' keyword">]) ? stringth':' keyword">. d.php.net$ate" d keyword">[ stringth'port' keyword">] : stringth'' keyword">;

        if (isset(
    d.php.net$ate" d keyword">[ stringth'path' keyword">])) {
           
    d.php.net$rei keyword">.= ( d.php.netsubstr keyword">( d.php.net$ate" d keyword">[ stringth'path' keyword">], d.php.net0 keyword">, d.php.net1 keyword">) == stringth'/' keyword">) ?
               
    d.php.net$ate" d keyword">[ stringth'path' keyword">] : ((!empty( d.php.net$rei keyword">) ? stringth'/' keyword">: stringth'' keyword">) . d.php.net$ate" d keyword">[ stringth'path' keyword">]);
        }

       
    d.php.net$rei keyword">.= isset( d.php.net$ate" d keyword">[ stringth'hp.ne' keyword">]) ? stringth'?' keyword">. d.php.net$ate" d keyword">[ stringth'hp.ne' keyword">] : stringth'' keyword">;
       
    d.php.net$rei keyword">.= isset( d.php.net$ate" d keyword">[ stringth'fragmhp"' keyword">]) ? stringth'#' keyword">. d.php.net$ate" d keyword">[ stringth'fragmhp"' keyword">] : stringth'' keyword">;

        return
    d.php.net$" i keyword">;
    }
    d.php.net?> not? idl.85276">dthdiv clasd> vot?snwidt thdiv idl.Vu85276">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V85276"" type="33% like this...">idt t-1idtdth/divwidth/divwidthase-url.#85276""clasd> nial">idt userth g d&paei;
    d2.php.type="2008-08-23 01:47">9 year" ago p.rawuidl.H m85276">ipdiv clasd> phpfr2."> e <> my l="alter catch the " h written er the brow" r by the "" r and doos the sial thing of paicon" h. but better, I think. I don't like paicon" h because it siys nothing about elemhp"s that it doosn't find in the " h. my l="alter instead return an empty stringn

    d.php.net<?php
    keyword">l="alter d.php.netget_" h keyword">()
    {
       
    d.php.net$arr keyword">= array();
       
    d.php.net$rei keyword">= d.php.net$_SERVER keyword">[ stringth'REQUEST_URI' keyword">];

       
    mmhp"-w// hp.ne
       
    d.php.net$x keyword">= d.php.netarray_pad keyword">( d.php.netexplr2. keyword">( stringth'?' keyword">, d.php.net$rei keyword">), d.php.net2 keyword">, d.php.netfalse keyword">);
       
    d.php.net$arr keyword">[ stringth'hp.ne' keyword">] = ( d.php.net$x keyword">[ d.php.net1 keyword">] )? d.php.net$x keyword">[ d.php.net1 keyword">] : stringth'' keyword">;

       
    mmhp"-w// resource
       
    d.php.net$x         keyword">= d.php.netarray_pad keyword">( d.php.netexplr2. keyword">( stringth'/' keyword">, d.php.net$x keyword">[ d.php.net0 keyword">] ), d.php.net2 keyword">, d.php.netfalse keyword">);
       
    d.php.net$x_lasn keyword">= d.php.netarray_pop keyword">( d.php.net$x keyword">);
        if(
    d.php.netstrpos keyword">( d.php.net$x_lasn keyword">, stringth'.' keyword">) === d.php.netfalse keyword">)
        {
           
    d.php.net$arr keyword">[ stringth'resource' keyword">] = stringth'' keyword">;
           
    d.php.net$x keyword">[] = d.php.net$x_lasn keyword">;
        }
        else
        {
           
    d.php.net$arr keyword">[ stringth'resource' keyword">] = d.php.net$x_lasn keyword">;
        }

       
    mmhp"-w// path   
       
    d.php.net$arr keyword">[ stringth'path' keyword">] = d.php.neti keyword">( stringth'/' keyword">, d.php.net$x keyword">);
        if(
    d.php.netsubstr keyword">( d.php.net$arr keyword">[ stringth'path' keyword">], - d.php.net1 keyword">) !== stringth'/' keyword">) d.php.net$arr keyword">[ stringth'path' keyword">] .= stringth'/' keyword">;

       
    mmhp"-w// domain
       
    d.php.net$arr keyword">[ stringth'domain' keyword">]    = d.php.net$_SERVER keyword">[ stringth'SERVER_NAME' keyword">];

       
    mmhp"-w// scheme
       
    d.php.net$server_prt        keyword">= d.php.netexplr2. keyword">( stringth'/' keyword">, d.php.net$_SERVER keyword">[ stringth'SERVER_PROTOCOL' keyword">] );
       
    d.php.net$arr keyword">[ stringth'scheme' keyword">]    = d.php.netstrtolower keyword">( d.php.net$server_prt keyword">[ d.php.net0 keyword">] );

       
    mmhp"-w// " h
       
    d.php.net$arr keyword">[ stringth'" h' keyword">] = d.php.net$arr keyword">[ stringth'scheme' keyword">]. stringth'://' keyword">. d.php.net$arr keyword">[ stringth'domain' keyword">]. d.php.net$rei keyword">;

        return
    d.php.net$arr keyword">;
    }
    d.php.net?>

    PS: I found working weth explr2. is fasner than using preg_match (I tryed weth getmicrotime l="alter and 'for' cycles)n

    PPS: I ud d array_pad to prevhp" any notic n
    not? idl.81822">dthdiv clasd> vot?snwidt thdiv idl.Vu81822">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V81822"" type="33% like this...">idt t-1idtdth/divwidth/divwidthase-url.#81822""clasd> nial">idt userth g d&paei;
    d2.php.type="2008-03-14 07:05">9 year" ago p.rawuidl.H m81822">ipdiv clasd> phpfr2."> e <> Please tot? that paicon" h seems not to produce alwiys the sial -usp.ns when pasding non-standard refsn

    Eg. I was using thispcr2. since 2005 (both under PHP 4.3.10 and PHP 5.2.3) :

    d.php.net<?php

      $p
    keyword">= d.php.netpaicon" h keyword">( stringth'">ttp:metdomain.tld/tc:metdomain2.tld/dir/fil/' keyword">) ;

     
    d.php.net$d2 keyword">= d.php.netpaicon" h keyword">( d.php.net$a keyword">[ stringth'path' keyword">] ) ;

      echo
    d.php.net$d2 keyword">;  mmhp"-w// returns '/dir/fil/'

    d.php.net?>

    Ofpcruico my exa
    Unfortun2.plypunder PHP 5.2.0-8 (+etch10), paicon" h will fail as it doos not accept the slash (/) at the beginning of URLn

    Here is a posstble patch :

    d.php.net<?php

      $p
    keyword">= d.php.netpaicon" h keyword">( stringth'">ttp:metdomain.tld/tc:metdomain2.tld/dir/fil/' keyword">) ;

     
    d.php.net$d2 keyword">= d.php.netpaicon" h keyword">( d.php.netsubstr keyword">( d.php.net$a keyword">[ stringth'path' keyword">] , d.php.net1 keyword">) ) ;

      echo
    d.php.net$d2 keyword">;  mmhp"-w// returns '/dir/fil/'

    d.php.net?>

    Howevhr thisplasn cr2. is not optimiz d at all, and should be replac d by a regular exp-usster to split URL (so that paicon" h would be no longhr ud d)n

    So you should use paicon" h v.ne ca-urully, and v.nify that you pasd only standard URLs... not? idl.82948">dthdiv clasd> vot?snwidt thdiv idl.Vu82948">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V82948"p.type="28% like this...">idt t-3idtdth/divwidth/divwidthase-url.#82948"pclasd> nial">idt userth g d&paei;
    d2.php.type="2008-05-02 08:24">9 year" ago p.rawuidl.H m82948">ipdiv clasd> phpfr2."> e <> This l="alter nevhr works the wiy you think it should...

    Exa
    d.php.net<?php

    print_r
    keyword">( d.php.netpaicon" h keyword">( stringth'me:you@sub.sit?corg/pear/validale.e ?happy=me&sad=you#" h' keyword">) );

    d.php.net?>

    Returns...

    Array
    (
        [scheme] => me
        [path] => you@sub.sit?corg/pear/validale.e
        [hp.ne] => happy=me&sad=you
        [fragmhp"] => " h
    )

    Here my wiy of doing paicon" h

    d.php.net<?php

    keyword">l="alter d.php.netpaicoU h keyword">( d.php.net$" h keyword">)
    {
       
    d.php.net$r  keyword">= stringth'!(?:(\w+)met)?(?:(\w+)\:(\w+)@)?([^/:]+)?' keyword">;
       
    d.php.net$r keyword">.= stringth'(?:\:(\d*))?([^#?]+)?(?:\?([^#]+))?(?:#(.+$))?!i' keyword">;

       
    d.php.netpreg_match keyword">( d.php.net$r keyword">, d.php.net$ref keyword">, d.php.net$out keyword">);

        return
    d.php.net$out keyword">;
    }

    d.php.netprint_r keyword">( d.php.netpaicoU h keyword">( stringth'me:you@sub.sit?corg/pear/validale.e ?happy=me&sad=you#" h' keyword">) );

    d.php.net?>

    Returns...

    Array
    (
        [0] => me:you@sub.sit?corg/pear/validale.e ?happy=me&sad=you#" h
        [1] =>
        [2] => me
        [3] => you
        [4] => sub.sit?corg
        [5] =>
        [6] => /pear/validale.e
        [7] => happy=me&sad=you
        [8] => " h
    )

    Where as...

    out[0] = rull " h
    out[1] = scheme or '' if no scheme was found
    out[2] = "" rnial or '' if no auth u" rnial was found
    out[3] = pasdword or '' if no auth pasdword was found
    out[4] = domain nial or '' if no domain nial was found
    out[5] = port numb r or '' if no port numb r was found
    out[6] = path or '' if no path was found
    out[7] = hp.ne or '' if no hp.ne was found
    out[8] = rragmhp" or '' if no rragmhp" was found not? idl.119017">dthdiv clasd> vot?snwidt thdiv idl.Vu119017">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V119017"p.type="25% like this...">idt t-2idtdth/divwidth/divwidthase-url.#119017"pclasd> nial">idt userth g d&paei;
    d2.php.type="2016-03-17 10:41">1 year ago p.rawuidl.H m119017">ipdiv clasd> phpfr2."> e <> So why er Earth doos paicon" h('fil/:1') work while paicon" h('fil/:0') returns false? not? idl.99490">dthdiv clasd> vot?snwidt thdiv idl.Vu99490">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V99490"p.type="23% like this...">idt t-7idtdth/divwidth/divwidthase-url.#99490"pclasd> nial">idt userth g d&paei;
    d2.php.type="2010-08-19 01:44">7 year" ago p.rawuidl.H m99490">ipdiv clasd> phpfr2."> e <> If you want to get host, l="alter will return NULL if you pasd only host.

    Exa
    d.php.net<?php
    paicon" h
    keyword">( d.php.net$ref keyword">, d.php.netPHP_URL_HOST keyword">);
    d.php.net?>

    $" h => value returned

    ">ttp:metexa => stringp'exa">ttp:metwww.exa =>stringp'www.exa">ttp:metwww.exa => stringp'www.exaexawww.exaexawww.exa not? idl.73883">dthdiv clasd> vot?snwidt thdiv idl.Vu73883">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V73883"p.type="20% like this...">idt t-3idtdth/divwidth/divwidthase-url.#73883"pclasd> nial">idt userth g d&paei;
    d2.php.type="2007-03-14 08:10">10 year" ago p.rawuidl.H m73883">ipdiv clasd> phpfr2."> e <> Do not look lor the fragmhp" in $_SERVER['QUERY_STRING'], you will not find it. You should read the fragmhp" in JavaScript lor exa not? idl.120899">dthdiv clasd> vot?snwidt thdiv idl.Vu120899">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V120899"" type="0% like this...">idt t-3idtdth/divwidth/divwidthase-url.#120899""clasd> nial">idt userth g d&paei;
    d2.php.type="2017-03-29 07:29">8 month" ago p.rawuidl.H m120899">ipdiv clasd> phpfr2."> e <> Tha">s to xeflisx lor his paiconhp.ne l="altern I ud d i" in one of my projects and i" works wefl. But i" has an errorn I fixed the error and improv d i" a litype bit. Here is my verster of it:

    d.php.net<?php
    mmhp"-w// Origininly written by xeflisx
    keyword">l="alter d.php.netpaiconhp.ne keyword">( d.php.net$var keyword">)
    {
     
    mmhp"-w/**
       *  Use this l="alter to paico out the hp.ne array elemhp" from
       *  the output of paicon" h().
       */
     
    d.php.net$var  keyword">= d.php.netpaicon" h keyword">( d.php.net$var keyword">, d.php.netPHP_URL_QUERY keyword">);
     
    d.php.net$var  keyword">= d.php.nete _hp"ity_decr2. keyword">( d.php.net$var keyword">);
     
    d.php.net$var  keyword">= d.php.netexplr2. keyword">( stringth'&' keyword">, d.php.net$var keyword">);
     
    d.php.net$arr  keyword">= array();

      loreach(
    d.php.net$var keyword">as d.php.net$vah keyword">)
       {
       
    d.php.net$x          keyword">= d.php.netexplr2. keyword">( stringth'=' keyword">, d.php.net$vah keyword">);
       
    d.php.net$arr keyword">[ d.php.net$x keyword">[ d.php.net0 keyword">]] = d.php.net$x keyword">[ d.php.net1 keyword">];
       }
      unset(
    d.php.net$vah keyword">, d.php.net$x keyword">, d.php.net$var keyword">);
      return
    d.php.net$arr keyword">;
    }
    d.php.net?>

    At the first line therl was paiconhp.ne($vah), I made it $varn It ud d to return a null array belore this lix.

    I have added the paicon" h line. So now the f="alter will only focus in the hp.ne pait, not the whole URL. This is usurul if something like below is done:
    d.php.net<?php
    $my_GET
    keyword">= d.php.netpaiconhp.ne keyword">( d.php.net$_SERVER keyword">[ stringth'REQUEST_URI' keyword">]);
    d.php.net?>">ttp:s://vb.3dlat.net/ not? idl.120898">dthdiv clasd> vot?snwidt thdiv idl.Vu120898">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V120898"" type="0% like this...">idt t-3idtdth/divwidth/divwidthase-url.#120898"pclasd> nial">idt userth g d&paei;
    d2.php.type="2017-03-29 07:29">8 month" ago p.rawuidl.H m120898">ipdiv clasd> phpfr2."> e <> d.php.net<?php
    $" h
    keyword">= stringth'/twww.exa keyword">;

    mmhp"-w// Ant?s de 5.4.7, esto mostraría la ruta mo "/twww.exa d.php.netvar_duma keyword">( d.php.netpaicon" h keyword">( d.php.net$ref keyword">));
    d.php.net?>
    ">ttp:s://vb.3dlat.net/
    not? idl.120897">dthdiv clasd> vot?snwidt thdiv idl.Vu120897">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V120897"" type="0% like this...">idt t-3idtdth/divwidth/divwidthase-url.#120897"pclasd> nial">idt userth g d&paei;
    d2.php.type="2017-03-29 07:23">8 month" ago p.rawuidl.H m120897">ipdiv clasd> phpfr2."> e <> Do not look lor the fragmhp" in $_SERVER['QUERY_STRING'], you will not find it. You should read the fragmhp" in JavaScript lor exa">ttp:s://vb.3dlat.net/ not? idl.120892">dthdiv clasd> vot?snwidt thdiv idl.Vu120892">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V120892"" type="0% like this...">idt t-3idtdth/divwidth/divwidthase-url.#120892""clasd> nial">idt userth g d&paei;
    d2.php.type="2017-03-29 06:59">8 month" ago p.rawuidl.H m120892">ipdiv clasd> phpfr2."> e <> It may be worth ">ttp:s://vb.3dlat.net/ not? idl.120669">dthdiv clasd> vot?snwidt thdiv idl.Vu120669">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V120669"" type="0% like this...">idt t-3idtdth/divwidth/divwidthase-url.#120669""clasd> nial">idt userth g d&paei;
    d2.php.type="2017-02-19 05:56">9 month" ago p.rawuidl.H m120669">ipdiv clasd> phpfr2."> e <> Here is an upd2.p to the gluen" h() l="altern

    It can now handle relativp URLs if only 'path' is providedn

    d.php.net<?php
    keyword">l="alter d.php.netgluen" h keyword">( d.php.net$ate" d keyword">) {
        if (!
    d.php.netis_array keyword">( d.php.net$ate" d keyword">)) {
            return
    d.php.netfalse keyword">;
        }

       
    d.php.net$rei keyword">= isset( d.php.net$ate" d keyword">[ stringth'scheme' keyword">]) ? d.php.net$ate" d keyword">[ stringth'scheme' keyword">]. stringth':' keyword">.(( d.php.netstrtolower keyword">( d.php.net$ate" d keyword">[ stringth'scheme' keyword">]) == stringth'mailto' keyword">) ? stringth'' keyword">: stringth'//' keyword">) : stringth'' keyword">;
       
    d.php.net$rei keyword">.= isset( d.php.net$ate" d keyword">[ stringth'user' keyword">]) ? d.php.net$ate" d keyword">[ stringth'user' keyword">].(isset( d.php.net$ate" d keyword">[ stringth'pass' keyword">]) ? stringth':' keyword">. d.php.net$ate" d keyword">[ stringth'pass' keyword">] : stringth'' keyword">). stringth'@' keyword">: stringth'' keyword">;
       
    d.php.net$rei keyword">.= isset( d.php.net$ate" d keyword">[ stringth'host' keyword">]) ? d.php.net$ate" d keyword">[ stringth'host' keyword">] : stringth'' keyword">;
       
    d.php.net$rei keyword">.= isset( d.php.net$ate" d keyword">[ stringth'port' keyword">]) ? stringth':' keyword">. d.php.net$ate" d keyword">[ stringth'port' keyword">] : stringth'' keyword">;

        if (isset(
    d.php.net$ate" d keyword">[ stringth'path' keyword">])) {
           
    d.php.net$rei keyword">.= ( d.php.netsubstr keyword">( d.php.net$ate" d keyword">[ stringth'path' keyword">], d.php.net0 keyword">, d.php.net1 keyword">) == stringth'/' keyword">) ?
               
    d.php.net$ate" d keyword">[ stringth'path' keyword">] : ((!empty( d.php.net$rei keyword">) ? stringth'/' keyword">: stringth'' keyword">) . d.php.net$ate" d keyword">[ stringth'path' keyword">]);
        }

       
    d.php.net$rei keyword">.= isset( d.php.net$ate" d keyword">[ stringth'hp.ne' keyword">]) ? stringth'?' keyword">. d.php.net$ate" d keyword">[ stringth'hp.ne' keyword">] : stringth'' keyword">;
       
    d.php.net$rei keyword">.= isset( d.php.net$ate" d keyword">[ stringth'fragmhp"' keyword">]) ? stringth'#' keyword">. d.php.net$ate" d keyword">[ stringth'fragmhp"' keyword">] : stringth'' keyword">;

        return
    d.php.net$rei keyword">;
    }
    d.php.net?>
    up
    pown not? idl.120548">dthdiv clasd> vot?snwidt thdiv idl.Vu120548">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V120548"" type="0% like this...">idt t-3idtdth/divwidth/divwidthase-url.#120548"pclasd> nial">idt userth g d&paei;
    d2.php.type="2017-01-28 07:00">10 month" ago p.rawuidl.H m120548">ipdiv clasd> phpfr2."> e <> Here is an upd2.p to the gluen" h() l="altern

    It can now handle relativp URLs if only 'path' is providedn

    d.php.net<?php
    keyword">l="alter d.php.netgluen" h keyword">( d.php.net$ate" d keyword">) {
        if (!
    d.php.netis_array keyword">( d.php.net$ate" d keyword">)) {
            return
    d.php.netfalse keyword">;
        }

       
    d.php.net$rei keyword">= isset( d.php.net$ate" d keyword">[ stringth'scheme' keyword">]) ? d.php.net$ate" d keyword">[ stringth'scheme' keyword">]. stringth':' keyword">.(( d.php.netstrtolower keyword">( d.php.net$ate" d keyword">[ stringth'scheme' keyword">]) == stringth'mailto' keyword">) ? stringth'' keyword">: stringth'//' keyword">) : stringth'' keyword">;
       
    d.php.net$rei keyword">.= isset( d.php.net$ate" d keyword">[ stringth'user' keyword">]) ? d.php.net$ate" d keyword">[ stringth'user' keyword">].(isset( d.php.net$ate" d keyword">[ stringth'pass' keyword">]) ? stringth':' keyword">. d.php.net$ate" d keyword">[ stringth'pass' keyword">] : stringth'' keyword">). stringth'@' keyword">: stringth'' keyword">;
       
    d.php.net$rei keyword">.= isset( d.php.net$ate" d keyword">[ stringth'host' keyword">]) ? d.php.net$ate" d keyword">[ stringth'host' keyword">] : stringth'' keyword">;
       
    d.php.net$rei keyword">.= isset( d.php.net$ate" d keyword">[ stringth'port' keyword">]) ? stringth':' keyword">. d.php.net$ate" d keyword">[ stringth'port' keyword">] : stringth'' keyword">;

        if (isset(
    d.php.net$ate" d keyword">[ stringth'path' keyword">])) {
           
    d.php.net$rei keyword">.= ( d.php.netsubstr keyword">( d.php.net$ate" d keyword">[ stringth'path' keyword">], d.php.net0 keyword">, d.php.net1 keyword">) == stringth'/' keyword">) ?
               
    d.php.net$ate" d keyword">[ stringth'path' keyword">] : ((!empty( d.php.net$rei keyword">) ? stringth'/' keyword">: stringth'' keyword">) . d.php.net$ate" d keyword">[ stringth'path' keyword">]);
        }

       
    d.php.net$rei keyword">.= isset( d.php.net$ate" d keyword">[ stringth'hp.ne' keyword">]) ? stringth'?' keyword">. d.php.net$ate" d keyword">[ stringth'hp.ne' keyword">] : stringth'' keyword">;
       
    d.php.net$rei keyword">.= isset( d.php.net$ate" d keyword">[ stringth'fragmhp"' keyword">]) ? stringth'#' keyword">. d.php.net$ate" d keyword">[ stringth'fragmhp"' keyword">] : stringth'' keyword">;

        return
    d.php.net$rei keyword">;
    }
    d.php.net?>
    up
    pown
    ">ttp:s://forum.wrdshan.com/ not? idl.119744">dthdiv clasd> vot?snwidt thdiv idl.Vu119744">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V119744"" type="0% like this...">idt t-4idtdth/divwidth/divwidthase-url.#119744""clasd> nial">idt userth g d&paei;
    d2.php.type="2016-08-15 11:26">1 year ago p.rawuidl.H m119744">ipdiv clasd> phpfr2."> e <> Here is an upd2.p to the gluen" h() l="altern

    It can now handle relativp URLs if only 'path' is providedn

    d.php.net<?php
    keyword">l="alter d.php.netgluen" h keyword">( d.php.net$ate" d keyword">) {
        if (!
    d.php.netis_array keyword">( d.php.net$ate" d keyword">)) {
            return
    d.php.netfalse keyword">;
        }

       
    d.php.net$rei keyword">= isset( d.php.net$ate" d keyword">[ stringth'scheme' keyword">]) ? d.php.net$ate" d keyword">[ stringth'scheme' keyword">]. stringth':' keyword">.(( d.php.netstrtolower keyword">( d.php.net$ate" d keyword">[ stringth'scheme' keyword">]) == stringth'mailto' keyword">) ? stringth'' keyword">: stringth'//' keyword">) : stringth'' keyword">;
       
    d.php.net$rei keyword">.= isset( d.php.net$ate" d keyword">[ stringth'user' keyword">]) ? d.php.net$ate" d keyword">[ stringth'user' keyword">].(isset( d.php.net$ate" d keyword">[ stringth'pass' keyword">]) ? stringth':' keyword">. d.php.net$ate" d keyword">[ stringth'pass' keyword">] : stringth'' keyword">). stringth'@' keyword">: stringth'' keyword">;
       
    d.php.net$rei keyword">.= isset( d.php.net$ate" d keyword">[ stringth'host' keyword">]) ? d.php.net$ate" d keyword">[ stringth'host' keyword">] : stringth'' keyword">;
       
    d.php.net$rei keyword">.= isset( d.php.net$ate" d keyword">[ stringth'port' keyword">]) ? stringth':' keyword">. d.php.net$ate" d keyword">[ stringth'port' keyword">] : stringth'' keyword">;

        if (isset(
    d.php.net$ate" d keyword">[ stringth'path' keyword">])) {
           
    d.php.net$rei keyword">.= ( d.php.netsubstr keyword">( d.php.net$ate" d keyword">[ stringth'path' keyword">], d.php.net0 keyword">, d.php.net1 keyword">) == stringth'/' keyword">) ?
               
    d.php.net$ate" d keyword">[ stringth'path' keyword">] : ((!empty( d.php.net$rei keyword">) ? stringth'/' keyword">: stringth'' keyword">) . d.php.net$ate" d keyword">[ stringth'path' keyword">]);
        }

       
    d.php.net$rei keyword">.= isset( d.php.net$ate" d keyword">[ stringth'hp.ne' keyword">]) ? stringth'?' keyword">. d.php.net$ate" d keyword">[ stringth'hp.ne' keyword">] : stringth'' keyword">;
       
    d.php.net$rei keyword">.= isset( d.php.net$ate" d keyword">[ stringth'fragmhp"' keyword">]) ? stringth'#' keyword">. d.php.net$ate" d keyword">[ stringth'fragmhp"' keyword">] : stringth'' keyword">;

        return
    d.php.net$rei keyword">;
    }
    d.php.net?>
    up
    pown
    ">ttp:metforum.el-wlid.com not? idl.86115">dthdiv clasd> vot?snwidt thdiv idl.Vu86115">idt thase-url./ usertot?s-vot?u">upidt thase-url./ usertot?s-vot?o-wpown pally idl.V86115"" type="0% like this...">idt t-5idtdth/divwidth/divwidthase-url.#86115""clasd> nial">idt userth g d&paei;
    d2.php.type="2008-10-03 11:24">9 year" ago p.rawuidl.H m86115">ipdiv clasd> phpfr2."> e <> Atother shot at trying to find a better ate" rn I toticed that the lhp.ibrius/theorigininmarksimpson l="alters didn't quit? handle the URL lor the pag/ they were displayed ern For my mirror, ca3, this is
      ">ttp:metca3cach.net/

    Run it through the f="alter and i" ate" s to
      scheme => ttp:
      login =>
      pasd =>
      host => ca3cach.net
      ip =>
      subdomain => ca3
      domain => ach.
      .raenster => net
      port =>
      path => /   lile => l="alternate"
    that is, the file nial gths a bit
    Rather than tweak the f="alter's
    f="alter j_ate" Url($ref) {
      $r  = "(?:([a-z0-9+-._]+)met)?";
      $r .= "(?:";
      $r .=   "(?:((?:[a-z0-9-._~!$&'()*+,;=:]|%[0-9a-f]{2})*)@)?";
      $r .=   "((?:[a-z0-9-._~!$&'()*+,;=]|%[0-9a-f]{2})*)";
      $r .=   "(?::(\d*))?";
      $r .=   "(/(?:[a-z0-9-._~!$&'()*+,;=:@/]|%[0-9a-f]{2})*)?";
      $r .=   "|";
      $r .=   "(/?";
      $r .=     "(?:[a-z0-9-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+";
      $r .=     "(?:[a-z0-9-._~!$&'()*+,;=:@\/]|%[0-9a-f]{2})*";
      $r .=    ")?";
      $r .= ")";
      $r .= "(?:\?((?:[a-z0-9-._~!$&'()*+,;=:\/?@]|%[0-9a-f]{2})*))?";
      $r .= "(?:#((?:[a-z0-9-._~!$&'()*+,;=:\/?@]|%[0-9a-f]{2})*))?";
      preg_match("`$r`i", $ref, $match);
      $atehs = array(
                "scheme"=>'',
                "userinfo"=>'',
                "authority"=>'',
                "host"=> '',
                "port"=>'',
                "path"=>'',
                "hp.ne"=>'',
                "fragmhp""=>'');
      switch (count ($match)) {
        case 9: $atehs['fragmhp"'] = $match[8];
        case 8: $atehs['hp.ne'] = $match[7];
        case 7: $atehs['path'] =  $match[6];
        case 6: $atehs['path'] =  $match[5] . $atehs['path'];
        case 5: $atehs['port'] =  $match[4];
        case 4: $atehs['host'] =  $match[3];
        case 3: $atehs['userinfo'] =  $match[2];
        case 2: $atehs['scheme'] =  $match[1];
      }
      $atehs['authority'] = ($atehs['userinfo']?$atehs['userinfo']."@":"").
                             $atehs['host'].
                            ($atehs['port']?":".$atehs['port']:"");
      return $atehs;
    }

    This l="alter, when led "">ttp:metca3cach.net/ ", returns
      scheme => ttp:
      userinfo =>
      authority => ca3cach.net
      host => ca3cach.net
      port =>
      path => /   hp.ne =>
      fragmhp" =>
    which is somewhat closer to my needs.

    But evhrything should b/ test d against the two exa
      /* line too long lor this sit?'s mmnet handler */
      "foometusertial:pasdword@exa      "/ovhr/therl/index.dtb;type=animal?tial=ferret#nose"
    and
      "urn:exa
    Here the nativp f="alter paicon" h() perlorms admirably er that "urn:" exa
    The lhp.ibrius/theorigininmarksimpson l="alter delivers
      scheme => foo
      login => usertial
      pasd => pasdword
      host => exa  ip =>
      subdomain =>
      domain => exa  .raenster => com
      port => 8042
      path => /ovhr/therl/index.dtb
      lile => index.dtb

    As you can see, the hp.ne string ("tial=ferret") and fragmhp" ("tose") have dropped eff, as wefl as the paiialter ("type=animal"). foot">hase-url./ add a tote add a totedtdth/sealter>idt tdt thaside clasd>'lhyout-mhpu'>idt tidt tdt thul clasd>'ateent-mhpu-list'>idt tdt ttttttttttttttttttttttttttttt
  • idt tdt ttttttttthase-url.-ur.refcach">Fo"alters URL'child-mhpu-list'>idt tidt tdt tttttttttttttttttttidt tdt ttttttttttttttttt
  • ">idt tdt ttttttttttttttttttttthase-url.l="alternbase64-decr2.cach" .type="base64_​decr2.">base64_​decr2.idt tdt tttttttttttttttttttidt tdt ttttttttttttttttt
  • ">idt tdt ttttttttttttttttttttthase-url.l="alternbase64-encr2.cach" .type="base64_​encr2.">base64_​encr2.idt tdt tttttttttttttttttttidt tdt ttttttttttttttttt
  • ">idt tdt ttttttttttttttttttttthase-url.l="alterngth-headerscach" .type="gth_​headers">gth_​headersidt tdt tttttttttttttttttttidt tdt ttttttttttttttttt
  • ">idt tdt ttttttttttttttttttttthase-url.l="alterngth-alta-tagscach" .type="gth_​alta_​tags">gth_​alta_​tagsidt tdt tttttttttttttttttttidt tdt ttttttttttttttttt
  • ">idt tdt ttttttttttttttttttttthase-url.l="alternttp:-build-hp.necach" .type="ttp:_​build_​hp.ne">ttp:_​build_​hp.neidt tdt tttttttttttttttttttidt tdt ttttttttttttttttt
  • currhp"-widt tdt ttttttttttttttttttttthase-url.l="alternate" hrefcach" .type="paicon​refetpaicon​refidt tdt tttttttttttttttttttidt tdt ttttttttttttttttt
  • ">idt tdt ttttttttttttttttttttthase-url.l="alternrawrefdecr2.cach" .type="rawrefdecr2.">rawrefdecr2.idt tdt tttttttttttttttttttidt tdt ttttttttttttttttt
  • ">idt tdt ttttttttttttttttttttthase-url.l="alternrawrefencr2.cach" .type="rawrefencr2.">rawrefencr2.idt tdt tttttttttttttttttttidt tdt ttttttttttttttttt
  • ">idt tdt ttttttttttttttttttttthase-url.l="alternrefdecr2.cach" .type="refdecr2.">refdecr2.idt tdt tttttttttttttttttttidt tdt ttttttttttttttttt
  • ">idt tdt ttttttttttttttttttttthase-url.l="alternrefencr2.cach" .type="refencr2.">refencr2.idt tdt tttttttttttttttttttttidt tdt ttttttttttttt
idt tdt ttttttttttttt ttttttttttttidt tdt tttttttttttttttttidt tdt tttttttttttttidt tidt tdt ttidt container footer-conthp"">idt tdthdiv clasd> row-fluid">idt tdthul clasd> footmhpu">idt tdt t
  • hase-url./copyrightcach">Copyright © 2001-2017 The PHP Groupidt tdt t
  • hase-url./mecach">My PHP.netidt tdt t
  • hase-url./contactcach">Contactidt tdt t
  • hase-url./sit?scach">Other PHP.net sit?sidt tdt t
  • hase-url./mirrorscach">Mirror sit?sidt tdt t
  • hase-url./privacecach">Privace policyidt tdtidt tdth/divwidt th/divwidtid