Access to server being blocked after several messages "Encrypted Data Transmission" - php

I am writing a little encrypted chat using my own custom chat-server written in php.
Everything works perfectly, but after exchanging 5-6 messages, all of a sudden the server becomes inaccessible.
I cannot access the pages(php and html) placed in the server.
I am not able to understand what is going on, so I tested with my mobile internet as well but the result was same.
Some suggestion/help will be appreciated.
EDIT
I've figured out the problem.
8+ HTTP POST request PER MIN to the server is causing the server to block my ip as it thinks it to be DDoS.
What can be done to solve this ?

Related

Maps API using file_get_contents causes internal 500 error

I have been using the Maps API service for a month now. This morning I found that the service has stopped working. Any request to maps.googleapis.com causes my server to hang for a moment and then display the internal server 500 error.
At first I thought I was blocked / banned by google and there must be something I have overlooked with the t and c's but having looked further there are no notifications in my google api dev console.
If I make a request from another server using the same API key it works.
If I make a request directly in the url bar with the same API key it also works.
It only hangs and causes a 500 error for the domain maps.googleapis.com and not any other. I am guessing that Google has blocked my server IP but it seems odd that they would do this and my API key still works fine. If they had blocked me it wouldn't it be the whole API account?
Firstly, how do I know if I am blocked?
Secondly, why do I not get a error from google saying what the issue is?
Why does it cause my server to issue a 500 error? If my server is blocked it wouldn't just respond to say whatever the API problem is?
All seem very strange to me. It only started today. I am hitting the API with file_get_contents using php 5.1 on an apache server.
To clarify, the 500 error is on my server, I cannot see any response from the http request because it hangs and then spits out the 500 error.
And now after 3 hours of debugging it works for no explained reason. The only possibility that i can think of is that the hosting company has been doing maintenance and something they changed caused this. after waiting on hold for 20 minuts they disconnected but perhaps they looked into it behind the scenes for me. Pretty annoyed a whole morning waisted and although im happy it has resolved its still frustrating to not know what or why

PHP URL Encoding (FileMaker IWP)

I have hosted a FileMaker database on the web using FileMaker Instant Web Publishing. I am trying to access it directly - as in bypass the login page - using the php command header().
This is the code I am currently using.
header("location: http://<serverIPaddress>/fmi/iwp/cgi?dbpath=%2Ffmi%2Fiwp%2Fcgi%3F-db%3D<databasename>%26-startsession&acct=account&name=<username>&password=<password>&login=Login&-authdb");
I got this code from here: http://lnx.acidsoft.net/problemsolved/bypass-filemaker-iwp-login-via-url.html
I don't believe the FileMaker part is as relevant, since accessing the database works fine when I remove all the other encoding stuff, I just can't bypass the login that way.
I believe it might be more of a problem with how the URL is structured and me not having enough experience to know how certain browsers or what language I'm using will affect the URL.
When I currently try to execute it, I get two dialog boxes.
First, I get one that says:
Bad Request
The server could not process your request due to a missing command: "”.
The second one says:
Bad Request
The server could not process your request because your session has timed out, been closed, or communication with the server has been lost.
Please reselect the database to begin a new session.
If you cannot open the database, please contact your database administrator.
Any ideas? I am using a button to call the .php file that calls this particular line, and I'm testing it on Safari and Google Chrome.
Kevin, I had same exact problem. Found an example of a working link here:
https://community.filemaker.com/thread/73562?start=0&tstart=0
...and the difference with my (failed) URL was the = in the url should be encoded to %3D
For me, having the actual = symbol made the link not work.
http://<DATABASE IP OR HOSTNAME>/fmi/iwp/cgi?dbpath=%2Ffmi%2Fiwp%2Fcgi%3F-db%3D<DATABASE NAME>%26-startsession&acct=account&name=<USERNAME>&password=<PASSWORD>&login=Login&-authdb
Good luck!

Facebook graph api doesn't response on real host but work fine in localhost

I had been using my written script for months and just from few days ago facebook stop responding ( it take forever to loads ) when the request is made from my host, but the same exact codes work fine when run in localhost.
I had been using curl method to get the group feed https://developers.facebook.com/docs/graph-api/reference/v2.0/group/members
file_get_contents("https://graph.facebook.com/489360131076423/feed/?access_token=APPID|SECRETCODE")
which still work fine in localhost but not in server. Then i also tried using "PHP SDK" method still having the same problem.
My setting in facebook developer is too seems to correct (it was working before too) as I have two domain allowed in App Domains setting which are "localhost" and "xxxxxxxx.im" ( my domain is .im not .com and obviously in xxxx i have my domain name written)
The question is
1. Can anyone suggest what could be the problem ?
2. Any suggestion for debugging this? because i don't get response at all. So no idea about any request error :(
Thanks :)
Try using ob_start(); function in the starting of page

server sent events - One client to update them all

Alright, so here is what I am trying to achieve. I have a custom built Point of Sale done in VB.net. What I want to add now is a customer facing android tablet that shows the reciept as it's entered into the Point of Sale.
Brainstorming how to do this I came up with the idea to use a php hosted script (no problem as the POS has a mysql-php web backend on a local server) that would use server sent events to update the tablet. The issue I'm facing is I'm not sure how to update the server (and thus the tablet) from another client (this one being the Point of Sale).
I can't seem to find any examples other than clocks for server sent events, does anyone have a link to something similar or perhaps a better solution than what I came up with?
I had considered using an app like idisplay and just extending that way, but it doesn't support windows 8 which is what the POS is running. I also considered websockets, but I don't have a firm enough grasp of that to get it up and running. I could make an app for the tablet, but I don't really want to do that, most of my background with app development is on iOS and I don't personally like java as a development language.
EDIT 1: Alright, so I'm understanding better how I would need to make this work.
So far I have it working where I can input a $_GET variable to change the value and the next time an update is pushed it works properly. I just need to verify there's new or different data before it pushes the data.
Is there a better example than this http://www.html5rocks.com/en/tutorials/eventsource/basics/ concerning how to push updates on demand to the listening clients?

App on Facebook

I'm trying to run the example.php file that comes with the facebook sdk. I do have a hosting server that runs php, and also changed the ID's to the corresponding one on my app. Here is the message i'm getting:
This webpage is not available
The webpage at https://filipeximenes.com/facebook/ might be temporarily down or it may have moved permanently to a new web address.
Error 501 (net::ERR_INSECURE_RESPONSE): Unknown error.
i'm pointing the canvas to this adress: http://filipeximenes.com/facebook/
Thanks.
Based on your description, I think that this is your problem:
Do you have a valid security certificate on the hosting server? I ran into that problem recently when deploying an FB app. Since October, you have to have a valid cert even in sandbox mode for the FB app to run properly. If you don't have one it causes weird problems.
Just a thought that I hope helps.
One other thing to do from a debugging perspective is to take a look at the actual app running on your hosting server without viewing it via FB. If you get the same error message there, you know that it has nothing to do with the FB SDK.
Thanks!
Matt

Categories