Page 1 of 1
PHP the only way?
Posted: Sat Jan 30, 2010 1:01 am
by burrito
Hi, i was wondering, the scripts for peoples websites to show things such as top pvp and raid boss status, i see them around here on the forums, but they are all PHP scripts, my website dont support php ( i could just switch), but before i do that i was wondering if there was another way of doing it, maybe in Javascript or any other kind of coding that can work w/ your sql database? Does anyone have any information about this ;p, i been searching but havnt come up w/ much.
Re: PHP the only way?
Posted: Sat Jan 30, 2010 4:17 am
by momo61
uhm ... javascript doesnt support database connection i think. You need to have php or some similar language to connect to your gameserver database
Re: PHP the only way?
Posted: Sun Jan 31, 2010 5:25 am
by poltomb
Besides the fact that it probably isn't even possible using Javascript (JS), I would STRONGLY suggest that JS be used for a secure DB connection. All JS that is used on a website is transmitted over to the client's browser. If you were to store any kind of password in a JS file, it would be transmitted to the client along with the JS file. That would pose a significant security risk, IMHO.
Re: PHP the only way?
Posted: Sun Jan 31, 2010 5:50 am
by burrito
thx for the input guys, but how secure is php i, like if someone checked page source they wouldnt get your database info right?
Re: PHP the only way?
Posted: Sun Jan 31, 2010 6:42 am
by qwerty13
For secure, just create db user for your site with limited access.
Example:
Code: Select all
CREATE USER 'site user'@'site ip' IDENTIFIED BY 'password';GRANT SELECT,INSERT,UPDATE,DELETE ON *.* TO 'site user'@'site ip';
If "hacker" know details of your site db user, he cant connect with that user because access for this user is limited for ip-address. And do not forget to set correct chmod on your site.
Re: PHP the only way?
Posted: Sun Jan 31, 2010 7:26 am
by burrito
cool thanks

Re: PHP the only way?
Posted: Sun Jan 31, 2010 4:35 pm
by poltomb
burrito wrote:thx for the input guys, but how secure is php i, like if someone checked page source they wouldnt get your database info right?
Correct. PHP is a server-side scripting languange, this means that it performs its operations on the server then simply delivers the content to the user.
Re: PHP the only way?
Posted: Sun Jan 31, 2010 6:08 pm
by KadeL
A simple solution is to use a free host
(zobyhost.com)
- 1 GB of space
- 30 GB Transfer
- Support PHP and MySQL
- No forced advertising
In the free host you put all the php, and your website html are calling php from in frames.
Code: Select all
<IFRAME src="http://your_free_hots/Name.php" width="500" height="350" scrolling="auto" frameborder="0"></IFRAME>
For example I have all my web in zobyhost
DNS of Zobyhost:
Nameserver 1: ns1.zobyhost.com
Nameserver 2: ns2.zobyhost.com
IP 1: 209.190.16.82
IP 2: 207.182.130.90
Re: PHP the only way?
Posted: Mon Feb 01, 2010 2:32 pm
by poltomb
KadeL wrote:A simple solution is to use a free host
(zobyhost.com)
- 1 GB of space
- 30 GB Transfer
- Support PHP and MySQL
- No forced advertising
In the free host you put all the php, and your website html are calling php from in frames.
Code: Select all
<IFRAME src="http://your_free_hots/Name.php" width="500" height="350" scrolling="auto" frameborder="0"></IFRAME>
For example I have all my web in zobyhost
DNS of Zobyhost:
Nameserver 1: ns1.zobyhost.com
Nameserver 2: ns2.zobyhost.com
IP 1: 209.190.16.82
IP 2: 207.182.130.90
Good idea, but often times the free hosts do not allow connections to remote SQL servers
Re: PHP the only way?
Posted: Mon Feb 01, 2010 3:01 pm
by KadeL
yes, If not allowed the remote connection to the database free host....
But if from the free PHP host for your database.
not if you understand what I say
for example
your PC ---> connected ----> db Free Host = not allow
your Php in Free Host ----> connected ----> you PC db = yes allow