PHP the only way?
Forum rules
READ NOW: L2j Forums Rules of Conduct
READ NOW: L2j Forums Rules of Conduct
-
- Posts: 276
- Joined: Wed Apr 15, 2009 6:41 am
PHP the only way?
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.
- momo61
- Posts: 1648
- Joined: Fri Jun 06, 2008 2:05 pm
- Location: Europe
Re: PHP the only way?
uhm ... javascript doesnt support database connection i think. You need to have php or some similar language to connect to your gameserver database
- poltomb
- L2j Veteran
- Posts: 225
- Joined: Wed Jul 13, 2005 7:13 am
- Location: USA
Re: PHP the only way?
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.
-
- Posts: 276
- Joined: Wed Apr 15, 2009 6:41 am
Re: PHP the only way?
thx for the input guys, but how secure is php i, like if someone checked page source they wouldnt get your database info right?
- qwerty13
- Posts: 640
- Joined: Mon Feb 02, 2009 9:57 am
- Location: Europe
- Contact:
Re: PHP the only way?
For secure, just create db user for your site with limited access.
Example:
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.
Example:
Code: Select all
CREATE USER 'site user'@'site ip' IDENTIFIED BY 'password';GRANT SELECT,INSERT,UPDATE,DELETE ON *.* TO 'site user'@'site ip';
- poltomb
- L2j Veteran
- Posts: 225
- Joined: Wed Jul 13, 2005 7:13 am
- Location: USA
Re: PHP the only way?
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.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?
-
- Posts: 142
- Joined: Sat Mar 15, 2008 11:04 pm
- Location: Argentina
- Contact:
Re: PHP the only way?
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.
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
(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>

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
Sorry everyone for my very bad English, I speak Spanish
- poltomb
- L2j Veteran
- Posts: 225
- Joined: Wed Jul 13, 2005 7:13 am
- Location: USA
Re: PHP the only way?
Good idea, but often times the free hosts do not allow connections to remote SQL serversKadeL 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.
For example I have all my web in zobyhostCode: Select all
<IFRAME src="http://your_free_hots/Name.php" width="500" height="350" scrolling="auto" frameborder="0"></IFRAME>
![]()
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
-
- Posts: 142
- Joined: Sat Mar 15, 2008 11:04 pm
- Location: Argentina
- Contact:
Re: PHP the only way?
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
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
Sorry everyone for my very bad English, I speak Spanish