# Get current url from a php page with an swf

**URL:** <https://forum.kirupa.com/t/get-current-url-from-a-php-page-with-an-swf/105732>\
**Category:** Uncategorized\
**Created:** [March 29, 2004, 12:59pm UTC](https://forum.kirupa.com/t/get-current-url-from-a-php-page-with-an-swf/105732 "2004-03-29T12:59:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mountainbyte](https://avatars.discourse-cdn.com/v4/letter/m/85e7bf/32.png) [@mountainbyte](https://forum.kirupa.com/u/mountainbyte)\
**Post date:** [March 29, 2004, 12:59pm UTC](https://forum.kirupa.com/t/get-current-url-from-a-php-page-with-an-swf/105732/1 "2004-03-29T12:59:46Z")

</div>

I have a hybred PHP/MySQL site with a Navbar on each page.

The navbar is built dynamically based on a prefs file.

I want to have the swf navbar read which current page it is on and highlight the button.

In php, I would get the page by doing a $curpage = $PHP\_SELF  
then pulling the substring to get the current page name.

How do I do this in Flash? When I try to load vars, I get all the html from the page, and no variables.

I would think that getURL(this) might be close, but I think that won’t be quite right for some reason.

Should I try an input type=hidden and use a form post or get?

I’m not sure how to extract variables from a page with other content on it.
