I've build TicTacToe game, and got it to work multiplayer. I have used one java server for connecting to the database and with the clients ( sockets ).
It works fine but now I am wondering if I could only make the clients connect to the database and receive/update data from there (whose turn it is and what move someone made), without any Java server and sockets.
Please help me on this one. Should I use sockets or not,...
User Profile
Collapse
-
Should I use Sockets or not, and why?
-
You might want to use more quotes. I think that's the problem here since an username is most likely a string with letters and/or numbers. Mysql doesn't "like" that.
Try this:
Code:$dsql1 = mysql_query("DELETE FROM mpw_3_5_test_dbase_users WHERE username='".$retrievedusr."'");
-
Possible solutions...dep ends on the settings of the server.
Code:<?php ini_set('upload_max_filesize','128M'); ini_set('post_max_size','128M'); ?>
Code:php_value memory_limit "128M"
Leave a comment:
-
Code:<script type="text/javascript"> var a = new Array('<?php echo implode("','",$php_array); ?>'); </script>
Leave a comment:
-
$_POST + $_GET = $_REQUEST;
In other words $_REQUEST search a $_POST or $_GET data you may want to retreive.
The $_GET can be seen in the browser addressbar ( so...not so good in most cases ).
I personally use $_POST.Leave a comment:
-
re: how to decrypt encrypted password
You can not decript it. However you can try [Deleted]. This tool searches in a big database with decripted strings. If you are lucky you might find out you password.Leave a comment:
-
On the server you must have php and a mail server like postfix or sendmail.
For flash you do not need anything special as flash will load in the users browser and use his flashplayer and browser resources.Leave a comment:
-
-use the function include();
-or use the function file_get_conten ts();
You will find documentation about this functions on php.netLeave a comment:
-
I'm a little confused.
Is $cdate the current date?
Do you store the current date and the previous date in the database?
The way i would do this:
-i would store the date in only one field in the database
-then i would compare the database date with $cdate = date("Y-m-d",time()); // $cdate is now the current dateLeave a comment:
-
Hy,
As far as I know Flash cannot sent email. It can however send a $_POST to a specific URL.
The solution would be to create a file mail.php ( or whatever name ) and do a form in flash cs3 to send the $_POST to this file.
mail.php will be responsible for the mail sending.
First just create a form and see if you get any $_POST data.
Another trick might be to have the flash file and the PHP mail script in the same file....Leave a comment:
-
Well when you
Code:$_SESSION['cart'][]= array( 'prd_name' => $prd_name, 'unit_price' => $unit_price, 'qty' => $qty, 'id_prd' => $id_prd);
Code:$_SESSION['cart'][0] = your first product added $_SESSION['cart'][1] = your second product added // and so on
Leave a comment:
-
There is a list of most common PHP frameworks.
Akelos, ash.MVC, CakePHP, CodeIgniter, DIY, eZ Components, Fusebox, PHP on TRAX, PHPDevShell, PhpOpenbiz, Prado, QPHP, Seagull, Symfony Project, WACT, WASP, Yii, Zend, ZooP.
I personally use and recommend CakePHP.Leave a comment:
-
But if you actually want to decrypt the md5 hash, you must know that md5 is a one way hash function, thus it can not be "decrypted" .
But your md5 hash might be found on a huge database of md5 decrypted strings.
An example of a website like that is: Md5 decrypter tool .
Hope it helps you.Leave a comment:
-
Hy,
You must first connect to the database. There are many ways to connect to the database. I will present one simple example. First create a config.php file an write:
[PHP]<?php
$dbhost = "your_mysql_hos t"; // most of the times is "localhost"
$dbuser = "your_mysql_use r";
$dbpassword = "your_mysql_pas sword";
$dbname = "your_mysql_dat abase_name";...Leave a comment:
-
You may try the "onload" attribute of the html body tag to trigger an AJAX event or you can use cron jobs ( in your problem might not help much ).Leave a comment:
-
Well you can't decrypt it directly. Md5 it's one way hash function. But there are some limited choices, like a huge database with md5 decrypted strings. You can try this Md5 decrypter tool.Leave a comment:
No activity results to display
Show More
Leave a comment: