Hi,
I have recently installed a new script onto my site that checks reiprocal links. Its like phpMyDirectory, but free and the support isnt great. Its called LMA from
Duncan Carver's - Online Marketing Today - Website Promotion & Marketing
My problems have been numerous and i have managed to fix them all so far with a very limited knowledge of php. However, it seems that i have finally hit one that has killed the script and i was wondering if you could help.
In the main directory file there is a call to run a function on the admin file. The function is the link checking routine that goes through the db and checks the reciprocals exist on the specified page.
The function works fine if i run a page that contains it.. i.e create a "linkcheck.php" that contains the script.
My problem is that i cannot seem to call this function correctly off the directory index. I think its something to do with the security settings (or something) on the server, but i have no idea what.
The origional function call: (i have commented it)
$fp = fsockopen($_SERVER['SERVER_NAME'], 80);
fputs($fp,"GET ".str_replace($basedir, "", $_SERVER['SCRIPT_NAME'])."admin.php?user=$username&pass=$password&action= linkcheck HTTP/1.1rnAccept: */*rnAccept-Language: es-mxrnUser-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows 9

rnHost: ".$_SERVER['SERVER_NAME']."rnConnection: Closernrn");
fclose($fp);
A different one of the same type that i wrote: (pasting it has removed alot of the characters)
$gjtserver = $_SERVER['SERVER_NAME'];
$gjtport = 80;
$gjturl = "http://www.accesscleaningsolutions.co.uk/resources/admin.php?user=$username&pass=$password&action=lin kcheck";
$gjtuser_agent = "Mozilla/4.0 (compatible; MSIE 5.5; Windows 9

";
$gjtheaders = "GET $gjturl HTTP/1.1rnAccept: */*rnAccept-Language: en-aurnUser-Agent: $gjtuser_agentrnHost: $gjtserverrnCookie: {$gjtcookie}rnCache-Control: no-cachernConnection: closernrn"; $fp = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); if (!socket_connect($fp, $gjtserver, $gjtport))
{
socket_close($fp);
}
socket_set_option($fp, SOL_SOCKET, SO_KEEPALIVE, TRUE);
socket_send($fp, $gjtheaders, strlen($gjtheaders), 0); socket_close($fp);
Neither of these work... ie the admin.php with the associated get variables never runs.
I have got a botch to work for now where the actual link check is perfomed inside the directory file and not in the admin, but it would be better in the admin for a whole array of reasons.
Is there something simple that i am missing?
Please help as any suggetions are much appreciated.
Graeme