SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    Confirmed Halfwit
    Join Date
    Oct 1999
    Location
    Vancouver, BC, Canada
    Posts
    983
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi there.. I'm sorry about this, but I've been staring at this little piece of code for 1 hour and can't get it going.. I should know this already, but if anyone can please tell me how this is done I will be eternally gratefull!

    I need to extract a word from a URL into a variable..
    The "REPORT" part is what I need in the variable. I think the forum chops up the URL, so look on your status bar for the full link example.

    I feel foolish, but thanks for this.. I'm just having a brain freeze.
    - A simple online WYSIWYG editor for HTML code snippets.
    - Managed Web Hosting - $3.95/month (resellers welcome)
    - Why pay more? $8.95 domains & $9.95 SSL certificates!

  2. #2
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am assuming someone will be clicking o nthe link and you need a php script to get some part of the requested URL if this is the case you will need to use Apache modrewrite or seomthing similar if you just need that portion of the url, and it will always be in that position you could use
    $url = "http://www.domain.com/reports/REPORT/more/directories/after/this";
    $data = explode("/", $url);
    $var = $data[4];
    Please don't PM me with questions.
    Use the forums, that is what they are here for.


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
  •