PHP the only way?

If something doesn't fit in any other forum then post it here.
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
burrito
Posts: 276
Joined: Wed Apr 15, 2009 6:41 am

PHP the only way?

Post 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.
User avatar
momo61
Posts: 1648
Joined: Fri Jun 06, 2008 2:05 pm
Location: Europe

Re: PHP the only way?

Post 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
User avatar
poltomb
L2j Veteran
L2j Veteran
Posts: 225
Joined: Wed Jul 13, 2005 7:13 am
Location: USA

Re: PHP the only way?

Post 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.
burrito
Posts: 276
Joined: Wed Apr 15, 2009 6:41 am

Re: PHP the only way?

Post 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?
User avatar
qwerty13
Posts: 640
Joined: Mon Feb 02, 2009 9:57 am
Location: Europe
Contact:

Re: PHP the only way?

Post 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.
burrito
Posts: 276
Joined: Wed Apr 15, 2009 6:41 am

Re: PHP the only way?

Post by burrito »

cool thanks :)
User avatar
poltomb
L2j Veteran
L2j Veteran
Posts: 225
Joined: Wed Jul 13, 2005 7:13 am
Location: USA

Re: PHP the only way?

Post 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.
KadeL
Posts: 142
Joined: Sat Mar 15, 2008 11:04 pm
Location: Argentina
Contact:

Re: PHP the only way?

Post 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
Sorry everyone for my very bad English, I speak Spanish
User avatar
poltomb
L2j Veteran
L2j Veteran
Posts: 225
Joined: Wed Jul 13, 2005 7:13 am
Location: USA

Re: PHP the only way?

Post 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
KadeL
Posts: 142
Joined: Sat Mar 15, 2008 11:04 pm
Location: Argentina
Contact:

Re: PHP the only way?

Post 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
Sorry everyone for my very bad English, I speak Spanish
Post Reply