Page 1 of 1
Recipical url not being detected if www left off
Posted: Mon Jun 14, 2010 2:53 pm
by 802284585
I am getting error messages in the check links saying link not found on recipical site. I can see the link on the site and noticed it is not added fully.
The site has added the url without the 'www' or without the 'www' and a '/' at the end.
I have added a short site name variable and extended line 771 (admin.php) to include this but it still fails. Short site name is defined as
http://name.com
My knowledge of scripting is low so this may not be the way to go.
{
if ($match[2] == $settings['site_url'] || $match[2] == $settings['site_url'].'/' || $match[2] == $settings['short_site_url'] || $match[2] == $settings['short_site_url'].'/')
{
$found = 1;
break;
}
Update
Posted: Thu Jun 24, 2010 9:32 am
by 802284585
Been looking at this closer and it seems the program can't find the url due to the layout of the page. The stripped $html text only finds mandinka-lodges.com it does not find the
http://mandinka-lodges.com hence it fails.
Page source:
<a href ="
http://gambiatourguides.com" target =_blank"><b>Gambiatourguides.com</b></a><br />
<span class="dots">.............................................................</span><br />
<a href ="
http://mandinka-lodges.com" target =_blank"><b>Mandinka-lodges.com</b></a><br />
<span class="dots">.............................................................</span><br />
Posted: Thu Jun 24, 2010 1:55 pm
by Klemen
Just BELOW the code you posted try adding this for the second (non-www) check:
Code: Select all
$settings['site_url']=str_replace('www.','',$settings['site_url']);
if ($match[2] == $settings['site_url'] || $match[2] == $settings['site_url'].'/' || $match[2] == $settings['short_site_url'] || $match[2] == $settings['short_site_url'].'/')
{
$found = 1;
break;
}
No Joy
Posted: Fri Jun 25, 2010 11:18 am
by 802284585
I tried that and it made no difference.
The reciprocal site is
http://www.cheaptravel1.com/resources.html
Looking for
http://www.mandinka-lodges.com
It also has the same problem with other URLs added to this site. They are legacy links added via the admin panel.
If you can't add these to your own version of Linkman I am happy to give you access to the admin page, I have added code to echo $html to screen if the link is not found and echo all urls found, it is something strange with the page layout and search strings I think.
Thanks
Kevin
Posted: Fri Jun 25, 2010 11:39 am
by Klemen
How about if you add the same code as before, but also just below
paste this
Code: Select all
$html=str_replace('href =','href=',$html);
Any luck?
yeahhhhh
Posted: Fri Jun 25, 2010 9:39 pm
by 802284585
Thanks, thats cracked the problem. A beer on the way
Kevin