Forums

Getting variables from URL (2 posts)

  1. zxb2
    Member
    Posted 4 years ago #

    Ok, I can easily grab variables from the URL, within WordPress, like this:

    http://theurl.com/downloads.htm?fileid=200

    But what if I want to use nice URLs?

    e.g. http://theurl.com/downloads/200/

    I don't know how to retrieve "200"

    WordPress must store it somewhere though right? Anyone know how I can retrieve it?

  2. zxb2
    Member
    Posted 4 years ago #

    http://us.php.net/parse_url

    Parse URL function looks like it could do it, not sure if it is the best way though...

Topic Closed

This topic has been closed to new replies.

About this Topic