Thread: HELP GET URL!!!

    #1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Posts
    35
    Rep Power
    15
    I have to get the clear url from verbose one, for example:
    verbose: http://www.devshed.com/cgi-bin/ubb/p...er=5&forum=PHP
    clear: http://www.devshed.com

    How can I get it? I tried some regular expression but failed.

    Much thanks
  2. #2
  3. .Net Developer
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    London
    Posts
    987
    Rep Power
    15
    This can be done with regular expressions..

    But i'm just writing an easy way to do this:

    <?
    $verbose="http://www.devshed.com/cgi-bin/ubb/postings.cgi?action=newtopic&number=5&forum=PHP";

    $values=explode("/",$$verbose);
    //split the values based on '/'.

    $clear="http://".$values[2];

    echo $clear;

    ?>



    ------------------
    SR -
    webshiju.com
    www.jobxyz.com-IT Career Portal
    ezipindia.com--WebStudio


    "The fear of the LORD is the beginning of knowledge..."

    [This message has been edited by Shiju Rajan (edited November 01, 2000).]

Similar Threads

  1. Change ip url to domain
    By crypt1c_c0d3 in forum Apache Development
    Replies: 2
    Last Post: January 2nd, 2004, 09:55 AM
  2. Issue with URL address using LWP
    By usaindp1776 in forum Perl Programming
    Replies: 4
    Last Post: September 3rd, 2003, 07:51 PM
  3. mod_rewrite and current URL
    By mikix in forum Apache Development
    Replies: 1
    Last Post: August 4th, 2003, 09:29 PM
  4. URL Handling
    By ranjankumar17 in forum HTML Programming
    Replies: 4
    Last Post: August 1st, 2003, 10:56 AM
  5. Need help: redirect to page based on text in URL
    By JPElectron in forum HTML Programming
    Replies: 2
    Last Post: July 18th, 2003, 11:44 PM

IMN logo majestic logo threadwatch logo seochat tools logo