How to convert/encode files to FLV using FFMPEG & PHP

How to convert/encode files to FLV using FFMPEG & PHP

So, as I’ve written in an earlier article on how to install FFMPEG on your server, while there are those who probably use a “YouTube Clone” script, there might be those who want to create their own using FFMPEG & PHP. FLV is the most widely used type of codec that runs on most Flash players.

So, let’s get started, there are actually a few steps into converting a file to FLV which are shown below Continue reading “How to convert/encode files to FLV using FFMPEG & PHP”

Flash: ASfunction Link Rollover Effect

External CSS

External css as it applies to dynamic text does have limitations Some of those limitations include:

Password Protecting Your Pages with htaccess

Creating the password file

The first step is to create a simple text file that will store your username and password, separated by a colon (:). The small catch is that the password must be encrypted. Luckily, there are many free web-based utilities that will encrypt the password for you. Try one of these:

Simply enter your desired username and password in one of these pages and submit the form. You’ll get back a string similar to the following: Continue reading “Password Protecting Your Pages with htaccess”

Php, MySql, .htaccess: friendly urls

Php, MySql, .htaccess: friendly urls

There are a lot of tutorials that show how to change an address like:

  • www.mysite.com/products.php?product_id=1234

into others like:

  • www.mysite.com/products/1234
  • www.mysite.com/products/1234.html

In this article I’d like to go one step forward and to create something like:

Thunderbird reply position

Sometimes I put up with computer stupidity much longer than I should. By default, Thunderbirdpositions the cursor at the bottom of the e-mail body when replying to an e-mail instead of at the top. I couldn’t figure out how to change it, so instead I rewired my brain to press Ctrl+r, Ctrl+Home to reply.

Today I decided enough is enough. After a brief Google search I found the solution to setting the reply position on e-mails to the top instead of the bottom. The stupid thing is that it’s not an application-wide setting, it’s an account setting.

1. In Thunderbird: Go to “Edit > Account Settings” *
2. Select “Composition & Addressing” for the account in question
3. Make sure the “Automatically quote the original message when replying” checkbox is checked.
4. In the dropdown box below that, select the option “start my reply above the quote”

This worked for Thunderbird 1.5, ymmv

* update: on Windows, the option can be found in: Tools -> Account Settings.

update 2: If you’re commenting to say “thank you”: You’re welcome!

mysql console backup restore

Question: How to backup the whole database?

Answer: Just omit the “table_name” argument. For example, mysqldump -u root -pwordpress > D:\wordpress.sql

Question: How to backup all the databases in MySQL?

USE –force to continue on errors

Answer: Use “–all-databases”. For example, mysqldump -u root -p –all-databases > D:\db.sql

linux mysqldump -u admin -p –all-databases > db.sql

Restoring

Now let’s to restore it. Enter the following command in the command line window (or shell):

mysql -u root -p wordpress < D:\wordpress_posts.sql

This will restore the “wp_posts” table. You need to specify the database name. Here, it is “wordpress“. The following command restore the whole database:

mysql -u root -p wordpress < D:\wordpress.sql

If you want to restore all the databases (you used “–all-databases” argument to generate a backup file before), you don’t need to specify the database name.

mysql -u root -p < D:\db.sql