Jadi, dengan mengetikkan http://mydomain.com/mysystem/credential.txt akan
terlihat username dan password? Nah, bukannya ini lebih parah daripada pakai
file php?
Pakai require/include saja.
<?php
require_once("config.php");
//blablabla
mysql_connect($host, $username, $password);
?>
Isi file config.php :
<?php
// supaya kalau orang mencoba membuka file ini, otomatis redirect ke index
if($_SERVER['PHP_SELF'] == "/config.php")
header("Location:index.php");
$host = "localhost";
$username = "apa";
$password = "apajuga";
?>
LuckyGuy354
IT Beginner
http://www.wiwid.org
----- Original Message -----
From: "deltasw" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Tuesday, April 18, 2006 9:51 AM
Subject: [MasterWeb] menyimpan id & password db connection yg aman
> Permisi, mo numpang nanya ya,
>
> Sebaiknya gimana sih nyimpan id & password database connection
> yg "lumayan" aman ?
>
> saya gak mau id & password di -hardcode di script php saya, tapi mau
> ambil informasi dari suatu file (jadi admin bisa lebih flexible
> melakukan penggantiannya).
>
> Yg jadi concern bagaimana tips menyimpan id & password tsb supaya
> tidak dengan mudah di-retrieve orang lain (khususnya secara remote).
>
> Yg kepikir saat ini, jika saya taruh di suatu text file
> (contoh : /mysystem/credential.txt ),
> maka tentunya orang yg sudah mengenal sistem yg kita bangun, akan
> dengan mudah mengakses file tsb. dengan mengarahkan ke :
> http://mydomain.com/mysystem/credential.txt, dan terekspose lah info
> rahasia tsb.
>
> Mohon advisnya ya.
>
> Thanks.
>
>
>
>
>
>
> ----------------------------------------------------------
> Komunitas MasterWeb Indonesia http://www.master.web.id
> ----------------------------------------------------------
> MWN, Masternya WEBHOSTING di Indonesia, Indo/USA Servers,
> Customer Support 24 jam http://www.masterwebnet.com
> ----------------------------------------------------------
> WebDevelopment,Designing/Programming http://www.dlanet.com
> ----------------------------------------------------------
> Yahoo! Groups Links
>
>
>
>
>
----------------------------------------------------------
Komunitas MasterWeb Indonesia http://www.master.web.id
----------------------------------------------------------
MWN, Masternya WEBHOSTING di Indonesia, Indo/USA Servers,
Customer Support 24 jam http://www.masterwebnet.com
----------------------------------------------------------
WebDevelopment,Designing/Programming http://www.dlanet.com
----------------------------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/milis-masterweb/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/