I'm trying to find a script or tool that when you input a long url like this: http://www.basspro.com/webapp/wcs/stores/servlet/Shop_10151_-1_10001 It ends up giving me just: http://www.basspro.com/ Would like it to do bulk lists of urls if possible. Thanks, ED
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