Contact Us Forum Rules Search Archive
WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-22-2007, 07:56 AM
WebProWorld New Member
 

Join Date: Jun 2006
Posts: 4
bilabong RepRank 0
Default PHP help - function call

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 9rnHost: ".$_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
__________________
Nothing is impossible for those who don't have to do it.

www.accesscleaningsolutions.co.uk
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Tags: , , ,



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
HELP! PHP Form being exploited dharrison Web Programming Discussion Forum 43 08-20-2007 09:44 AM
[For Hire] Expert in Php, Mysql, AJAX, JavaScript, HTML, XML, Smarty , API shailesh.gajjar Services for Sale/Hire 0 07-13-2007 02:59 AM
PHP isset () function kurt.santo Web Programming Discussion Forum 2 07-02-2007 04:47 AM
Infospace Call Ingenio for Pay Per Call Partnership WPW_Feedbot Search Engine Optimization Forum 0 12-07-2005 02:00 AM
Call Me Old-Fashioned, Call Me 'Indoctrinated,' But ... mythman Google Discussion Forum 1 01-15-2004 10:53 PM


Search Engine Optimization by vBSEO 3.2.0