Hi. I believe the problem is that the script uses \n and your machine needs \r\n.
Please try this to fix the problem: First make a backup of the robot_functions.php file. Then in robot_functions.php, do the following:
- find:
PHP Code:
$auth_string = 'Authorization: Basic '.base64_encode($components['user'].':'.$components['pass'])."\n";
and replace with:
PHP Code:
$auth_string = 'Authorization: Basic '.base64_encode($components['user'].':'.$components['pass'])."\r\n";
- find:
PHP Code:
$cookiesSendString .= "Cookie: ".$cookieString['string']."\n";
and replace with:
PHP Code:
$cookiesSendString .= "Cookie: ".$cookieString['string']."\r\n";
- find:
PHP Code:
@ini_set('user_agent','PhpDig/'.PHPDIG_VERSION.' (PHP; MySql)'."\n".phpDigMakeCookies($cookiesToSend,$path));
and replace with:
PHP Code:
@ini_set('user_agent','PhpDig/'.PHPDIG_VERSION.' (PHP; MySql)'."\r\n".phpDigMakeCookies($cookiesToSend,$path));
- find:
PHP Code:
$request =
"HEAD $path HTTP/1.1\n"
."Host: $host$sport\n"
.$cookiesSendString
.$auth_string
."Accept: */*\n"
."Accept-Charset: ".PHPDIG_ENCODING."\n"
."Accept-Encoding: identity\n"
."User-Agent: PhpDig/".PHPDIG_VERSION." (PHP; MySql)\n\n";
and replace with:
PHP Code:
$request =
"HEAD $path HTTP/1.1\r\n"
."Host: $host$sport\r\n"
.$cookiesSendString
.$auth_string
."Accept: */*\r\n"
."Accept-Charset: ".PHPDIG_ENCODING."\r\n"
."Accept-Encoding: identity\r\n"
."User-Agent: PhpDig/".PHPDIG_VERSION." (PHP; MySql)\r\n\r\n";
- find:
PHP Code:
$req1 = "HEAD $path HTTP/1.1\n"
."Host: $host$sport\n"
.$cookiesSendString
.$auth_string
."Accept: */*\n"
."Accept-Charset: ".PHPDIG_ENCODING."\n"
."Accept-Encoding: identity\n"
."User-Agent: PhpDig/".PHPDIG_VERSION." (PHP; MySql)\n\n";
and replace with:
PHP Code:
$req1 = "HEAD $path HTTP/1.1\r\n"
."Host: $host$sport\r\n"
.$cookiesSendString
.$auth_string
."Accept: */*\r\n"
."Accept-Charset: ".PHPDIG_ENCODING."\r\n"
."Accept-Encoding: identity\r\n"
."User-Agent: PhpDig/".PHPDIG_VERSION." (PHP; MySql)\r\n\r\n";
I think that's all of them that absolutely need to be changed. I also think you could just do a search and replace, changing all \n to \r\n in the files.
As a general rule of thumb, I believe it's like this for different OS:
Windows uses \r\n
Macintosh uses \r
*nix uses \n