i want to protect admin.php of my script so that no one can access it, can anyone help me with the code for it?
.htaccess is the quickest way in my opinion - http://www.htmlite.com/HTA006.php
but what if i dont have acceses to the server?
If you can upload files, you can use .htaccess (if allowed by the server administrator).
maybe this: in "index.php" ( or whatever )
define( 'securityFlag', 1 )
in "admin.php"
if ( securityFlag!=1 ) { die ( "no hacking pls" ); }