1 hypocrite Nov 09, 2005 09:32
3 hypocrite Nov 09, 2005 15:29
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. :)
4 personman Nov 09, 2005 15:50
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?
5 hypocrite Nov 09, 2005 18:04
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.
6 yabba Nov 09, 2005 18:19
Can you post the link that they are trying to fopen() ?
¥
7 hypocrite Nov 09, 2005 19:18
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.
8 yabba Nov 09, 2005 19:28
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]
¥
9 blueyed Nov 20, 2005 04:26
I get 503 - Connect failed with my browser (Konqueror) on both URLs currently.
10 hypocrite Nov 20, 2005 17:00
I can open both URL's with my browsers (Internet Explorer and Mozilla Firefox) currently.
Are you still not able to open the pages?
11 blueyed Nov 20, 2005 17:24
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
12 hypocrite Nov 21, 2005 07:57
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?