Hello,
I have a script which has to include a php file from users websites and make a post at their websites, anyway when something is wrong usually the script gives me an error but sometimes there is not an error or even a success message. Now I think that certain servers where they are hosted blocked my server IP so I need to check if my IP is blocked at their server. Is there any PHP method to do that? Like for example I can check via a proxy on my computer if I can browse a website, is there any method in PHP to do that? Using a proxy site or something like this?
How to check if my server ip is banned?
Moderator: General Moderators
Re: How to check if my server ip is banned?
If your users can run a script from their site that connects to yours successfully then you are not blocked.
if
runs fine and shows your page on their site, then you should not be blocked. However there are a few other issues with the problem you are finding. How are your retrieving these include files (code would be helpful)? What is the error message? Do you have permissions to access their files remotely? (FYI -- I don't even want to go into the issues of running remote code).
if
Code: Select all
echo file_get_contents("http://yoursite.com");Re: How to check if my server ip is banned?
Shouldn't be the other way? They can not "file_get_contents" my website if they have blocked my IP? Or I can not "file_get_contents" their website if they blocked my ip?
My script has to connect to other websites that are in wordpress and make a post to them via xmlrpc, the code is like above to connect to their website, usually when there is a problem with a connection I got a message for example "bad login/pass credentials" and an Integer if the post was successful. but with some blogs I do not get a response at all. Some of the members earlier said that the problem was because their server blocked my IP, now I need to check by myself if the problem is the bann IP.
Code:
My script has to connect to other websites that are in wordpress and make a post to them via xmlrpc, the code is like above to connect to their website, usually when there is a problem with a connection I got a message for example "bad login/pass credentials" and an Integer if the post was successful. but with some blogs I do not get a response at all. Some of the members earlier said that the problem was because their server blocked my IP, now I need to check by myself if the problem is the bann IP.
Code:
Code: Select all
$client = new IXR_Client($url . '/xmlrpc.php'); Re: How to check if my server ip is banned?
I understand now. You want to know ahead of time if your IP is blocked before the user experiences problems. I can't think of any reliable way to do that. The only way to tell is when the client tries to access your server as I posted. The problem is there are several ways they could be blocking your traffic and detecting all of them remotely isn't really possible as least as far as I know.
You have to have the user run something interactively to test for it.
You have to have the user run something interactively to test for it.
Re: How to check if my server ip is banned?
I have got his cPanel details, and uploaded the script with file_get_contents() and it runs fine my website on it, so my server IP is not blocked?
Now I can not access that website from my PC, just with proxy. When I login to that website on cPanel my IP was not listed as Banned there but I can not login at that website from my PC just with proxy. So if file_get_contents() runs successfully the IP it is not banned? Thanks for your help.
Now I can not access that website from my PC, just with proxy. When I login to that website on cPanel my IP was not listed as Banned there but I can not login at that website from my PC just with proxy. So if file_get_contents() runs successfully the IP it is not banned? Thanks for your help.
Re: How to check if my server ip is banned?
Doesn't sound like you're blocked to me.
Perhaps you should back up and explain what is going on exactly because I don't quite understand what you are doing. What is the remote PHP script your site is trying to include from the problem user's remote site? What are you trying to send to the remote site when you say "make a post at their websites"?
Where in this process is it breaking?
Why are you using a proxy to browse other sites as a test? Are you talking about browsing from the server itself or from your local computer? Or are they one and the same?
Perhaps you should back up and explain what is going on exactly because I don't quite understand what you are doing. What is the remote PHP script your site is trying to include from the problem user's remote site? What are you trying to send to the remote site when you say "make a post at their websites"?
Where in this process is it breaking?
Why are you using a proxy to browse other sites as a test? Are you talking about browsing from the server itself or from your local computer? Or are they one and the same?
Re: How to check if my server ip is banned?
Check this link to check your domain either it is banned or not
http://www.selfseo.com/google_ban_tool.php
http://www.selfseo.com/google_ban_tool.php