View Single Post
  #23 (permalink)  
Old 01-29-2008, 12:45 PM
bbrian017 bbrian017 is offline
Banned
 
Join Date: Oct 2007
Location: Canada
Posts: 914
Thanks: 169
Thanked 17 Times in 17 Posts
Quote:
Originally Posted by Geoserv View Post
Change:

Code:
if(preg_match("'<title>([^<]*?)</title>'", $this->html, $matches)) {
            $url_title=trim($matches[1]);
            $url_title = preg_split("/:|&raquo;\-/", $url_title);
            $url_title = array_slice($url_title, -1);
            $this->url_title = $url_title[0];  

}
to:

Code:
if( preg_match( '~<title>(.*?)([^:\-]*?)</title>~is', str_replace( '&raquo;', ':', $this->html ), $matches ) )
{
  $this->url_title = $matches[2];
}
and that will fix them all.

Geoserv.
Seems to be working Geoserv thanks a lot
Reply With Quote