View Single Post
  #22 (permalink)  
Old 01-29-2008, 10:59 AM
Geoserv Geoserv is offline
Banned
 
Join Date: Feb 2007
Location: Canada
Posts: 849
Thanks: 74
Thanked 49 Times in 45 Posts
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.
Reply With Quote
The Following User Says Thank You to Geoserv For This Useful Post: