spajetty Posted October 4, 2010 Share Posted October 4, 2010 this is a third party login. it works on wampserver but when i started to put it online the registration shows up an error saying "could not connect socket". if you want to check it here's the link. http://kchonline.ph/admin/register.php is this a database problem? Quote Link to comment https://forums.phpfreaks.com/topic/215096-could-not-open-socket/ Share on other sites More sharing options...
BlueSkyIS Posted October 4, 2010 Share Posted October 4, 2010 impossible to tell without seeing code. Quote Link to comment https://forums.phpfreaks.com/topic/215096-could-not-open-socket/#findComment-1118899 Share on other sites More sharing options...
spajetty Posted October 6, 2010 Author Share Posted October 6, 2010 Here you go thanks! [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/215096-could-not-open-socket/#findComment-1119519 Share on other sites More sharing options...
fenway Posted October 7, 2010 Share Posted October 7, 2010 No, not all the code -- just the relevant section. Quote Link to comment https://forums.phpfreaks.com/topic/215096-could-not-open-socket/#findComment-1119917 Share on other sites More sharing options...
spajetty Posted October 8, 2010 Author Share Posted October 8, 2010 function _recaptcha_http_post($host, $path, $data, $port = 80) { $req = _recaptcha_qsencode ($data); $http_request = "POST $path HTTP/1.0\r\n"; $http_request .= "Host: $host\r\n"; $http_request .= "Content-Type: application/x-www-form-urlencoded;\r\n"; $http_request .= "Content-Length: " . strlen($req) . "\r\n"; $http_request .= "User-Agent: reCAPTCHA/PHP\r\n"; $http_request .= "\r\n"; $http_request .= $req; $response = ''; if( false == ( $fs = @fsockopen($host, $port, $errno, $errstr, 10) ) ) { die ("Could not open socket: $errno - $errstr"); } fwrite($fs, $http_request); while ( !feof($fs) ) $response .= fgets($fs, 1160); // One TCP-IP packet fclose($fs); $response = explode("\r\n\r\n", $response, 2); return $response; } Quote Link to comment https://forums.phpfreaks.com/topic/215096-could-not-open-socket/#findComment-1120093 Share on other sites More sharing options...
fenway Posted October 8, 2010 Share Posted October 8, 2010 That's not mysql. Quote Link to comment https://forums.phpfreaks.com/topic/215096-could-not-open-socket/#findComment-1120209 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.