SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: Extract URLs

  1. #1
    SitePoint Addict
    Join Date
    Sep 2004
    Location
    victoria
    Posts
    210
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Extract URLs

    Say for this URL: http://www.example.com/folder/home/wonder.html

    I would like to first extract:

    http://www.example.com

    I would then like to extract:

    /folder/home/wonder.html

    I would then like to extract:

    /folder/home/

    How would I go about doing this?

  2. #2
    Tranceoholic lilleman's Avatar
    Join Date
    Feb 2004
    Location
    Írebro, Sweden
    Posts
    2,716
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    Take a look at the function parse_url. Does it help you?

    Yours, Erik.
    ERIK RIKLUND :: Yes, I've been gone quite a while.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •