# Browser complete URL

**URL:** <https://forum.kirupa.com/t/browser-complete-url/301903>\
**Category:** web dev\
**Created:** [December 17, 2009, 3:33pm UTC](https://forum.kirupa.com/t/browser-complete-url/301903 "2009-12-17T15:33:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ruiganga](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/ruiganga/32/3679_2.png) [@ruiganga](https://forum.kirupa.com/u/ruiganga)\
**Post date:** [December 17, 2009, 3:33pm UTC](https://forum.kirupa.com/t/browser-complete-url/301903/1 "2009-12-17T15:33:22Z")

</div>

Hi

I am trying to insert in the following code the browser window URL after &link= .

I don’t know why I can’t do it. Can anyone give me a hint?

my code is

```auto
$isFlashVar = '<script type="text/javascript">
    function isFlash()
    {
       var L = navigator.plugins.length;
       var D = document.location.href;
       for(var i=0; i<L; i++) {
         if(navigator.plugins*.name == "Shockwave Flash"){
                //reload with flash = 1 in the querystring
                location.href = "' . $_SERVER['PHP_SELF'] . '?flash=1&link=".D;
            	break;
         } else {
             if(i==L-1){
                //reload with flash = 0 in the querystring
                location.href = "' . $_SERVER['PHP_SELF'] . '?flash=0";
             }
         }
       }
     }
     isFlash();
    </script>';

```

D should be the document complete URL.

Thanks for any help.
