2 personman Nov 09, 2005 15:20

According to the administrator, they are using the fopen command.
But I do not know if they are using xml-rpc. As a matter of fact I don't even know what that is. :)
I didn't know a web page could do anything to keep fopen from fetching data from it, outside of making it unreadable. But if anyone online can view your page through a browser, then there should be no problem. Can the admin at this site view your page in a browser?
Yes, everyone can read the blogs through a browser.
The only problem is that my users are reporting problems when they are trying to add their blog to the Finnish bloglist.
According to the bloglist administrator, if the fopen function returns an error message the bloglist thinks that the blog is not working. He said that tthe problem is with b2evolution. Don't know if it is.
Can you post the link that they are trying to fopen() ?
¥
I have tried to add the following links:
http://www.kotichat.com/blog/blogs/index.php/satu.html
http://www.kotichat.com/blog/
The bloglist doesn't accept either of them.
this may or may not help, but, with the following code :-
<?php
$url="http://www.kotichat.com/blog/blogs/index.php/satu.html";
$handle = fopen($url, 80);
$theResults="";
if($handle)
{
while (!feof($handle)) {
$theResults .= fgets($handle, 4096);
}
fclose($handle);
}
echo $theResults;
?>
I get the following response :-
Warning: fopen(http://www.kotichat.com/blog/blogs/index.php/satu.html): failed to open stream: HTTP request failed! HTTP/1.1 412 Precondition Failed in [path to test file]
¥
I get 503 - Connect failed with my browser (Konqueror) on both URLs currently.
I can open both URL's with my browsers (Internet Explorer and Mozilla Firefox) currently.
Are you still not able to open the pages?
Ok, now it works (from the browser).
But the code that ¥åßßå posted does not work.
The same for a simple
file_get_contents($url);
http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html says:
10.4.13 412 Precondition Failed
The precondition given in one or more of the request-header fields evaluated to false when it was tested on the server. This response code allows the client to place preconditions on the current resource metainformation (header field data) and thus prevent the requested method from being applied to a resource other than the one intended.
So it's a server issue. I guess it's mod_security on Apache that prevents access when there's User-Agent PHP in the headers of the request.
I've just tried wget'ing the URL and it's the same error. But also if I change the user-agent to "Mozilla" simply:
wget --user-agent=Mozilla http://www.kotichat.com/blog/blogs/index.php/satu.html
Thank you.
I think you are right.
Probably our server administrators have changed that setting after our server was having a lot of DoS attacks lately. I have to talk to them if they can correct the problem.
I don't know what type of command they would be sending. fopen or cURL would let them read the site, but that shouldn't cause any problems. Are they using xml-rpc?