function strip_links($document) {
preg_match_all("'<a\s.*?href\s*=\s* # find <a href=
([\"\'])? # find single or double quote
(?(1) (.*?)\\1 | ([^\s\>]+)) # if quote found, match up to next matching
# quote, otherwise match up to next space
'isx",$document,$links);
пхп пример парсинг ссылок выдран из Snoopy класса
А вот из тулбара примерный код :)
Где URL адрес Вашего сайта