Hello I am looking for this script, If you have it, please contact me. I may buy your script with reliable price. Texas Hold'em Multiplayer pocker in AJAX, Javascript And PHP I have looked for it for a long time. I can pay via LibertyReserve. Thank You Very Much !
i hope you don't plan on running anything with real money over such a system, it is too open to exploits as a platform.
There's no reason why AJAX (and PHP and Javascript, which are essential what AJAX is anyway) should be any more open to exploits than any other platform. A badly programmed C++ application can be a lot worse than a well programmed AJAX app.
because you are relying on clientside data that is too open to manipulation and interception w/o any special tools. for starters, a special poker client will be written in a way that will make it impervious to debugging and hacking. where there is money there will be cheating, its that simple. the problem is, javascript won't be enough to deter less technical wannabes who happen to own firefox, firebug and a webdev plugin. considering you can modify the javascript on the fly or dom elements, form targets, json data etc, you get a problem. you need to be extremely confident to have a good solid data model that's not going to be penetrated. you need to be able to NEVER trust the client. you need to only send data to the client that's relevant to them and their hand, and ideally, encrypt it. here is a way to cheat i'd look for: monitor xhttp requests, for example, when you get to play, say - fold, see something like http://domain/?a=1&aa=0 i can basically tell that calling this url gets you to fold - if done at the right time. so what if you can figure how sessions are managed and manage to hijack a session - then call this url on behalf of someone you are betting against to get them to fold w/o wanting to? then, people get annoyed. they lose money, you run your service on a web server, you need that server to be up and running and to be FAST. all it takes is to run some apache test suite that stress tests your server via say, 300 concurrent user requests every second. it will gradually mount up and make ajax requests for everyone playing slower and slower... until they start being so late in the response they fail to make their play. speaking of which, its a timed game, you get say, 15 secs to call or fold or raise... in accordance to YOUR pc clock. not everyone's clock runs the same and certainly they wont all run in sync with the server, you will often get issues with plays not reaching you or the others in time. consider network wise a round of play: 9 players on the table, cards out -> thats at least 9 JSON objects that get received on a timed event by the players. first player has to play... they get 15 seconds to play. so, they play after 4 sec, say raise. now, what do you do with the other 8 players, they need to find out what's been played, right? YOU KNOW their clients will have had a setTimeout check to see the world status and last play after the 15 secs, but does that mean that for 11 seconds you do nothing? or, do you get each of these 9 users to run 1 ajax request every second that basically tells them if anything has changed? you'd kind of need to... so thats a lot of requests. each request takes what, an average of 200ms on a decent connection. add some lag, its now... 500-600ms (half a second) - thats the delay before you get the response back. in theory you get the response and you then what, set a new timeout for the next update, right? which is due... in 400ms or is it less due to cpu speed of processing and request time... and what happens if your update takes 1104ms to return (you get lag while your brother is uploading some porn to his p2p mates)? you see, this is when it will start getting tricky. that's why you need the sandbox to run this from - be it flash, java or whatever - making it hard to figure out what's going on for less advanced users and having open sockets to your server with real time data. good luck though - i'd dig a fun poker in js/ajax