Need a script or tool to strip off end of url string

Discussion in 'Scripts' started by schmidte, Mar 9, 2007.

  1. #1
    schmidte, Mar 9, 2007 IP
  2. bobby9101

    bobby9101 Peon

    Messages:
    3,292
    Likes Received:
    134
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I can probably whip that up for you in PHP
    send me a PM
     
    bobby9101, Mar 9, 2007 IP
  3. Estevan

    Estevan Peon

    Messages:
    120
    Likes Received:
    8
    Best Answers:
    1
    Trophy Points:
    0
    #3
    hello
    i believed this help you
    <?php
    if(isset($_POST['shortu']))
    {
    $_urls=explode("\n",$_POST['urls']);
    for($i=0;$i<count($_urls);$i++)
    {
    $info=parse_url($_urls[$i]);
    echo $info['host']."<br />";
    }

    }
    ?>
    <form action="" method="post" enctype="application/x-www-form-urlencoded">
    <textarea style="width:100%; height:250px;" name="urls"></textarea>
    <input type="submit" name="shortu" value="submit" />
    </form>
    add http:// in urls ok
     
    Estevan, Mar 9, 2007 IP
    Alvin likes this.
  4. schmidte

    schmidte Peon

    Messages:
    345
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #4

    Works Great......Thanks Alot!!!
    ED
     
    schmidte, Mar 10, 2007 IP