NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page parsing urls in a script

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 10-31-2005, 10:52 AM THREAD STARTER               #1 (permalink)
The original NP Emo Kid
 
liam_d's Avatar
Join Date: Jan 2005
Location: Plymouth, UK
Posts: 1,693
liam_d is a name known to allliam_d is a name known to allliam_d is a name known to allliam_d is a name known to allliam_d is a name known to allliam_d is a name known to all
 




parsing urls in a script


Hi all i have this;

PHP Code:
    //urls    
    
$chr_limit '45';
    
$add '...';
    
    
$view preg_replace("!(http:/{2}[\w\.]{2,}[/\w\-\.\?\&\=\#]*)!e""'<a href=\"\\1\" title=\"\\1\" target=\"_blank\">'.(strlen('\\1')>=$chr_limit ? substr('\\1',0,$chr_limit).'$add':'\\1').'</a>'"$view); 
????: NamePros.com http://www.namepros.com/programming/136496-parsing-urls-in-a-script.html
Although that doesn't parse urls if there is no http://, can anyone modify that or create one like it to handle urls with the http:// ?

Thanks!
liam_d is offline  
Old 10-31-2005, 11:38 AM   #2 (permalink)
You are here: X
 
mr-x's Avatar
Join Date: Oct 2003
Location: US
Posts: 483
mr-x is a glorious beacon of lightmr-x is a glorious beacon of lightmr-x is a glorious beacon of lightmr-x is a glorious beacon of lightmr-x is a glorious beacon of light
 



Have you looked at http://www.php.net/parse_url
mr-x is offline  
Old 10-31-2005, 12:13 PM THREAD STARTER               #3 (permalink)
The original NP Emo Kid
 
liam_d's Avatar
Join Date: Jan 2005
Location: Plymouth, UK
Posts: 1,693
liam_d is a name known to allliam_d is a name known to allliam_d is a name known to allliam_d is a name known to allliam_d is a name known to allliam_d is a name known to all
 




Thats not what i mean, parsing url for bbcode it what im doing...if you know php you would read my code above and understand
liam_d is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
myspace type script liam_d Website Development 4 11-02-2005 05:39 PM
'Multi Blog' script? Ericsson Website Development 9 10-31-2005 03:27 AM
survey script with photo upload crossfire Website Development 1 10-30-2005 09:46 PM
What is the Best Blogging Script for this purpose... RegFee Website Development 0 10-29-2005 10:11 PM

Liquid Web Smart Servers  
All times are GMT -7. The time now is 01:02 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger