PHP, Java, JavaScript, XML, XHTML, HTML, CSS, ASP, Delphi, Assembly, LaTeX, C, UML, Flash, Perl, SQL, Python, Zope, Pascal, WML. Se conhece mais de 3 siglas referidas, este é o forum para si.
Moderadores: Administradores, Moderadores
por Uran » Domingo Ago 29, 2004 21:48
Boas,
queria que me indicassem algum script de .php que desse para tornar uma página segura, com acesso restrito, e que a página a segurar fosse um uploader de imagens... (o objectivo é ter algo que permita por as imagens na net)
Já arranjei o phpSecurePages, e um script de upload muito simples... mas tou a ter algumas dificuldades
-( Projecto Uranio )-
-

Uran
- Aprendiz

-
- Mensagens: 56
- Registado: Terça Jul 08, 2003 18:17
- Localização: Porto
por [PT]CableGuy » Terça Ago 31, 2004 2:53
Boas:
Aqui ficam alguns links interessantes sobre o "assunto":
yappa-ng
r-GALLERY
PhotoFrame
Zenith Picture Gallery
PHPphotoAlbum
Para protegeres as páginas PHP , o mais fácil que conheço é:
- Código: Seleccionar todos
Simple php password protection
Looking for an easy way to password protect a page using php? Try the following script. Remember that you'll need to save the file with a .php extension for it to work and change the "user" and "password" values to suit.
<html>
<head>
<title>password protection test</title>
</head>
<body>
<?php
// Define your username and password
$username = "user";
$password = "password";
if ($_POST['txtUsername'] != $username || $_POST['txtPassword'] != $password) {
?>
<p>
<b>Login</b>
</p>
<form name="form" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<div align="center">
<center>
<table border="0" cellpadding="5" cellspacing="0">
<tr>
<td><label for="txtUsername">Username</label>
</td>
<td><input type="text" title="Enter your Username" name="txtUsername" /></td>
</tr>
<tr>
<td><label for="txtpassword">Password</label>
</td>
<td><input type="password" title="Enter your password" name="txtPassword" /></td>
</tr>
</table>
</center>
</div>
<p align="center"><input type="submit" name="Submit" value="Login" /></p>
</form>
<?php
}
else {
?>
<p>This is the protected page. Place your content here.</p>
<?php
}
?>
</body>
</html>
Mas existem outras "formas":
Cookie Password Protection
PHP : Scripts and Programs : Password Protection
Boa Sorte.

-
[PT]CableGuy
- Gurus

-
- Mensagens: 1845
- Registado: Domingo Mai 30, 2004 16:26
Voltar para Programação
Quem está ligado:
Utilizador a ver este Fórum: Nenhum utilizador registado e 1 visitante