View Single Post
Old 07-05-2005, 05:22 PM   #2
vodevil
Green Mole
 
Join Date: Mar 2005
Posts: 11
Replace this


Code:
//=================================================
//Find if an url is same domain than another
function PhpDigCompareDomains($url1,$url2) {
    $url1 = parse_url($url1);
    $url2 = parse_url($url2);
    if ( isset($url1['host']) && isset($url2['host'])
    && eregi('^([a-z0-9_-]+)\.(.+)',$url1['host'],$from_url)
    && eregi('^([a-z0-9_-]+)\.(.+)',$url2['host'],$to_url)
    && $from_url[2] == $to_url[2]) {
       return true;
    }
    else {
       return false;
    }
}
by this


Code:
//=================================================
//Find if an url is same domain than another
function PhpDigCompareDomains($url1,$url2) {
    $url1 = parse_url($url1);
    $url2 = parse_url($url2);
    if ( isset($url1['host']) && isset($url2['host'])
    && eregi('^([a-z0-9_-]+)\.(.+)',$url1['host'],$from_url)
    && eregi('^([a-z0-9_-]+)\.(.+)',$url2['host'],$to_url)
    && $from_url[2] == $to_url[2]) {
       return true;
    }
    else {
       return true;
    }
}
in robot_functions.php if is don't work replace by this



Code:
//=================================================
//Find if an url is same domain than another
function PhpDigCompareDomains($url1,$url2) {
    $url1 = parse_url($url1);
    $url2 = parse_url($url2);
    if ( isset($url1['host']) && isset($url2['host'])
    && eregi('^([a-z0-9_-]+)\.(.+)',$url1['host'],$from_url)
    && eregi('^([a-z0-9_-]+)\.(.+)',$url2['host'],$to_url)
    && $from_url[2] == $to_url[2]) {
       return false;
    }
    else {
       return false;
    }
}
vodevil is offline   Reply With Quote