Reply to Making links shorter

Your name:

Reply:


Posted by Arjen on 02/25/06 17:04

I currently convert hyperlinks on my site with this piece of code

$text = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]",
"<a href=\"\\0\">\\0</a>", $text)


Is there anyway to shorten the second part of the link linke this
<a href
="http://www.mysite.com/longtext_and_more_stuff>http://www.mysite.com/lon
....</a>

Im just no sure how to do this ... ive tried substr and all that but the
problem is I dont know wich url im working at cause this piece of code
just changes all the urls in the text

Arjen

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация