Posteado por Mnosh el 09 de Diciembre de 2010 a las 17:10hs.

# encript.in [proteger enlaces de descarga]

encript.in

Luego de algunos días un poco ocupado entre estudios y trabajos, me decidí a desarrollar un pequeño sitio que tenia dándome vueltas en la cabeza.


Básicamente funciona como hides.at (y alguno otro que anda por la vuelta) con la idea de anteponer un capacha para impedir que los enlaces sean reportados.


Extendiendo un poco la idea, agregué cuentas de usuario, y un panel para administrar y poder editar los enlaces de cada contenedor, proteger por password cada enlace, agregar descripciones, tags, títulos, activar indexación y reportar enlaces dañados.
Con el tema de la indexación y los tags, a medida que la web crezca y se llene la base de datos, voy a activar la nube de tags, y el directorio de enlaces, con lo cual el sitio aparte sera navegable.


Es lo que usare de ahora en más para los enlaces del blog, el registro queda abierto para aquellos que lo quieran utilizar.

La url del sitio: http://www.encript.in

 

Posteado por Mnosh el 09 de Diciembre de 2010 a las 02:30hs.

PHP 5.3 videotutorial

manual php en español

PHP 5.3-English version | ISO | 903 MB

PHP 5.3 Advanced web application programming. Learn the nuts and bolts of advanced web application programming!  Join Edward Tanguay as he dives into PHP programming. In his workshop, you will learn that it only takes a few minutes to get an Apache web server, a MySQL database, PHP 5.3, and the Eclipse editor up and running using the free XAMPP installation tool. Edward will then cover the PHP syntax, such as operators, loops and variables, before moving on to make you a PHP expert, tackling object orientation, databases, XML parsing, web services, security and much more. The training also includes important new features of PHP 5.3, such as namespaces, lambdas, and late static binding. Once you complete this video training, you will have the skills you need to build next-generation dynamic websites.

Posteado por Mnosh el 07 de Noviembre de 2010 a las 17:17hs.

Mastering phpMyAdmin 3.3.x [PDF]

phpMyAdmin is an open source tool written in PHP to handle MySQL administration over the World Wide Web. It can execute SQL statements and manage users and their permissions. However, when it comes to exploiting phpMyAdmin to its full potential, even experienced developers and system administrators are left baffled.

Mastering phpMyAdmin 3.3.x for Effective MySQL Management is an easy-to-follow, step-by-step guide that walks you through every facet of this efficient tool. Author Marc Delisle draws on his experience as one of the leading developers and project administrator of phpMyAdmin and uses his unique tutorial approach to take full advantage of its potential. This book is filled with illustrative examples that will help you understand every phpMyAdmin feature in detail.

The book helps you get started with installing and configuring phpMyAdmin and looks at its features. You then work on a sample project with two basic tables and perform basic actions such as creating, editing, and deleting data, tables, and databases. You will learn how to create up-to-date backups and import the data that you have exported. You will then explore different search mechanisms and options for querying across multiple tables.

The book gradually proceeds to advanced features such as defining inter-table relations and installing the linked-tables infrastructure. Some queries are out of the scope of the interface and this book will show you how to accomplish these tasks with SQL commands.

Posteado por Mnosh el 08 de Octubre de 2010 a las 15:29hs.

PHP and MySQL Tutorials Web Development

videotutorial php and mysql

LearnPHP&MySQL is a comprehensive resource of categorized web development tutorials. We intend to make it the richest online database of web development tutorials, including, but not limited to, PHP and MySQL tutorials. Enjoy browsing our growing selection of free professional PHP/MySQL tutorials to find out that you don’t need to be a Super Brain to learn web development in all its minutest details. Create web pages with dynamic content, develop web based software applications, design your own PHP projects, and all that with our PHP tutorials. The tutorials are updated daily from different authors and sites so that you won’t have to spend hours searching the web for them yourself. The number of tutorials is constantly increasing as LearnPHP.org is open to readers as well as to new authors. If you’re a programming guru or an experienced amateur this is the place for you to submit your tutorials. Enjoy browsing and learning!
* The MySQL database server (for both Unix and Windows)
* Accessing MySQL databases through PHP scripting (the letters don’t really stand for anything)
* Database creation and modification
* PHP tricks in order of increasing complexity–everything from basic SQL queries to secure transactions for commerce
* Authentication
* Network connectivity
* Session management
* Content customization
- PHP and MySQL Essential Training | Lynda.com
- PHP and MySQL Beyond The Basics | Lynda.com
- PHP and MySQL Basics and Ajax | CartoonSmart.com

Posteado por Mnosh el 09 de Enero de 2010 a las 08:00hs.

Sistema de login con PHP y MySQL

Vamos a mostrar cómo crear un sistema de login utilizando PHP con el driver de PDO (para php5.x) y una base de datos MySQL.
La idea principal es registrar usuarios, loguearlos en el sitio y desloguearlos del mismo de la forma más simple para luego poder proteger áreas con unas simples líneas de código.
Partimos de una base de datos, no muy complicada, desde la consola podemos crearla con la siguientes consultas:

consulta.sql
1
2
3
4
5
6
7
8
 
CREATE TABLE `users`.`acccounts` (
`id` INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`nick` VARCHAR( 20 ) NOT NULL ,
`email` VARCHAR( 50 ) NOT NULL ,
`password` VARCHAR( 32 ) NOT NULL ,
`salt` CHAR( 6 ) NOT NULL
) ENGINE = MYISAM ;



Bien, nuestra base de datos se llama “users” y dentro tenemos nuestra tabla “accounts” la cual cuenta con una columna id, nick, email, password y salt.
La columna password almacenara la contraseña del usuario concatenada con el salto, todo esto encriptado en MD5, con lo cual conseguimos distintos hashes para mismos passwords (esto evita comparar hashes entre sí o contra alguna lista en internet).
Ok, para intentar hacerlo lo más simple posible, voy a utilizar un archivo con todas las funciones, clases, instancias, etc. y lo incluiré al principio de cada archivo.. evidentemente en un proyecto ordenaríamos el asunto, a modo de funcionar en MVC o como sea.

Bien, iniciamos la sesión y definimos las constantes para la conexión a la base de datos.



1
2
3
4
5
session_start();
defined('DB_HOST')? null : define("DB_HOST", "localhost"); //servidor mysql
defined('DB_USER')? null : define("DB_USER", "root"); // usuario mysql
defined('DB_PASS')? null : define("DB_PASS", ""); // password del usuario mysql
defined('DB_NAME')? null : define("DB_NAME", "users"); // nombre de la base de datos



creamos un objeto $db ,instancia de PDO con los atributos para manejar errores:

Posteado por Mnosh el 12 de Diciembre de 2009 a las 08:00hs.

Creando un sistema simple para manejo de captcha en php

Un sistema de captcha (Completely Automated Public Turing test to tell Computers and Humans Apart) es la solución frecuente para evitar que robots spamers que visiten nuestro sitio puedan registrarse, enviar comentarios, participar en encuestas o cualquier yuyo en cuestión. Si bien esto no nos garantiza un 100% de efectividad , de seguro nos vale.

Supongamos un sitio web desarrollado en php al cual queremos implementarle una solución para frenar bots spamers, bien entonces instalamos re-captcha y listo, gracias por participar…

Ok, si bien nos sirve, quizás queramos saber cómo funciona y por ahí crear el nuestro propio, así que de eso va este post… comencemos.

Para generar imágenes en php nos valemos de la librería GD el cual está presente en la mayoría de los web hosting. En caso de utilizar localhost, instalando wamp para Windows ya nos viene incluido, y desde Linux bastaría con compilar php con la opción de gd, así como las librerías de libpng y libjpeg ( ./configure –with-gd=/… –with-png-dir=/… –with-jpeg-dir=… ).


Básicamente lo que necesitamos es generar una cadena de texto con letras y números al azar, almacenarlo en la sesión y luego comprobar con lo que el usuario inserto en la caja del formulario, en caso de coincidir se salto el captcha, caso contrario regresamos con un mensaje de error y con una nueva imagen para intentar.