Feliz año nuevo 2014 a todos

Feliz año nuevo 2014 a todos


Los números de 2013

Los duendes de las estadísticas de WordPress.com prepararon un informe sobre el año 2013 de este blog.

Aquí hay un extracto:

La sala de conciertos de la Ópera de Sydney contiene 2.700 personas. Este blog ha sido visto cerca de 22.000 veces en 2013. Si fuera un concierto en el Sydney Opera House, se se necesitarían alrededor de 8 presentaciones con entradas agotadas para que todos lo vean.

Haz click para ver el reporte completo.

How to prevent mail from going to spam

Baljit Web Developer

$to = $user_email;

$subject=’Application Form ‘;
$headers  = “From: My site<noreply@example.com>\r\n”;
$headers .= “Reply-To: info@example.com\r\n”;
$headers .= “Return-Path: info@example.com\r\n”;
$headers .= “X-Mailer: Drupal\n”;
$headers .= ‘MIME-Version: 1.0’ . “\n”;
$headers .= ‘Content-type: text/html; charset=iso-8859-1’ . “\r\n”;
echo “Mail Successfully Sent..”;

Ver la entrada original

PHP: isset() versus empty()

Kate's Code Derps

Empty() is generally better to use over isset() ‘cause empty() will pick up strings with no values and will catch empty $_REQUEST statements. Whoo!

Ver la entrada original

Download file created dynamically using PHP headers

My daily cup of tea

I used this snippet to dynamically create some content and allow the user to download it as a file.

$fileContent = ".... Your Content ...";
$filename = "licenseFile.lic";
header("Content-Type: application/download");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Pragma: public");
header("Content-Disposition: attachment; filename=\"$filename\"");

echo $fileContent;

Ver la entrada original

How to remove mysql completely from a Mac

cheonhyangzhang's programming

I was having this problem because I installed a wrong version of mysql.

So I have to remove previous version.

I got this steps online and it works for me.

First of all, remember to stop the mysql server.

You can stop the server by System Preferences -> MySQL, Stop MySQL Server

1 Sudo edit file  /etc/hostconfig

Remove line MYSQLCOM=-YES-

Actually I don’t have this line in the file

2 Open up terminal and run the following commands

sudo rm /usr/local/mysql
sudo rm -rf /usr/local/mysql*
sudo rm -rf /Library/StartupItems/MySQLCOM
sudo rm -rf /Library/PreferencePanes/MySQL*
sudo rm -rf /Library/Receipts/mysql*
sudo rm -rf /Library/Receipts/MySQL*
sudo rm /etc/my.conf

For some of the files I still don’t have in my Mac. Maybe because I did not have a full installation of mysql before.

Ver la entrada original

What’s the SQL Injection.?

ahsan's weblogs

An SQL Injection can destroy your database.

SQL Injection

SQL injection is a technique where malicious/harmful users can inject SQL commands into an SQL statements, via web page input.
Injected SQL commands can alter SQL statement and compromises the security of a web application.

1. SQL Injection Based on 1=1 is Always True.

txtUserId = getRequestString(“UserId”);
txtSQL = “SELECT * FROM Users WHERE UserId = ” + txtUserId;
txtUserId = 105 or 1=1;
SELECT * FROM Users WHERE UserId = 105 or 1=1;

2. SQL Injection Based on “”=”” is Always True.

uName = getRequestString(“UserName”);
uPass = getRequestString(“UserPass”);
sql = “SELECT * FROM Users WHERE Name ='” + uName + “‘ AND Pass ='” + uPass + “‘”

SELECT * FROM Users WHERE Name =”” or “”=”” AND Pass =”” or “”=””
The result SQL is valid. It will return all rows from the table Users, since WHERE “”=”” is…

Ver la entrada original 41 palabras más