Sunday, June 8, 2008

Download YouTube videos

Not just YouTube but most of the websites sharing some form of videos have shifted to Flash format (.flv files). There are websites that can download these videos for you but do you really need to go to another website to download these ??

1. You need to install a player for .flv files. You can search on Google for free flv player. Here is the link to the one I use:

FLV Player

2. To download a video from YouTube, just play the video using Internet Explorer. Once it is fully played, go to Tools menu --> Internet Options. Under Browing History, click on Settings and then click View Files. It will open the Temporary Files Folder in your hard drive. You can sort the files by name or size (or even type) and look for a file with name starting with get_video (without any file extension).

3. Copy and paste this file some where in your computer and add an extension (.flv) to it. Play it with the FLV Player you downloaded earlier.

Hurray !!!

Even the videos from other websites, which are in flash format, can be downloaded and played using the above steps. They may already have .flv extension or may not like in case of YouTube.

Tip: If you want to reduce the effort in finding the file in Temporary Files Folder, clean your your browsing history before you play the file. For this, go to Tools menu --> Internet Options --> Delete Browsing History.. and click Delete All and selet the box for Also delete files and settings stored by Add-ons and click yes.

Monday, November 26, 2007

Remove the annoying U3 platform from your USB drive

I heard many people dont like the new U3 technology that comes with the USB drives these days... You can uninstall that from the USB drive.. its very simple..

Click on the link below.. it will take you to U3 Launchpad Removal page... and follow the instructions.

Remove U3 Launchpad !!

Tuesday, July 17, 2007

PHP Oracle Connectivity

A simple code to connect to Oracle from PHP

$c=OCILogon("scott", "tiger", "orcl");
if ( ! $c )
{
echo "Unable to connect: " . var_dump( OCIError() );
die();
}

print("Connected to Oracle!!");

In the above code, 'scott' is a pre-defined user with 'tiger' as its password. 'orcl' is the Oracle SID that was selected on installation.

For more information on PHP-Oracle connectivity, please refer: http://www.orafaq.com/faq/php

PHP and MySQL Connectivity

Here is a simple code to connect to MySQL from PHP assumnig MySQL.

<?php

$user="MySQL-Username";
$password="Password";

// Connect to MySQL
if ( !( $db = mysql_connect( "localhost","root", "" ) ) )
die( "Could not connect to database" );

// open networks database
if ( !mysql_select_db( "dbname") )
die( "Could not open the database" );

print("Connected to MySQL!!");

?>

Thursday, July 12, 2007

Outlook 2003 Calendar Printing - "The messaging interface has returned an unknown error"

Problem: When you try to print another user's shared calendar in Microsoft Office Outlook 2003, the calendar does not print. Additionally, you receive the following error message:

"The messaging interface has returned an unknown error. If the problem persists, restart Outlook."

Solution:

Disable the TaskPad option
1. On the File menu, click Print.
2. Click Page Setup.
3. On the Format tab, click to clear the TaskPad check box.
4. Click OK to close the Page Setup dialog box.
5. With the Daily Style print style selected, click OK to print the shared calendar.

and u are good to go!!

Tuesday, July 10, 2007

IIS 5.0 error message: Service Unavailable

Solution:

1. Open the IIS Manager, right click Web Sites on the left panel and select properties.
2. Click on the Service Tab.
3. Check "Run WWW Service in IIS 5.0 Isolation Mode".
4. If asked to Restart of IIS then click yes else click Start --> Run --> type 'iisreset' and press Enter.

Try opening the website again and you will be perfectly fine.

Dynamic IFRAME resizing...

IFRAME is generally not considered a good idea to use but sometimes it really helps. But resizing an IFRAME as per the content is a big issue and I found a piece of code after some search which can resolve this issue.


<script language="JavaScript">
<!--
function calcHeight()
{
//find the height of the internal page
var the_height=
document.getElementById('the_iframe').contentWindow.
document.body.scrollHeight;

//change the height of the iframe
document.getElementById('the_iframe').height=
the_height;
}
//-->
</script>
and in the body create the iframe tag: 
<iframe width="700" id="the_iframe"
onLoad="calcHeight();"
src="testing_page.shtml"
scrolling="NO"
frameborder="1"
height="1">
</iframe>
Reference:  http://guymal.com/mycode/iframe_size/

Monday, July 9, 2007

MySQL Error 1251: Client does not support authentication protocol


MySQL 5.0 uses an authentication protocol based on a password hashing algorithm that is incompatible with that used by older (pre-4.1) clients. If you upgrade the server from 4.0, attempts to connect to it with an older client may fail giving you this error.

Solution:

Reset the password to pre-4.1 style for each user that needs to use a pre-4.1 client program. This can be done using the SET PASSWORD statement and the OLD_PASSWORD() function as follows:

mysql> SET PASSWORD FOR 'username'@'hostname' = OLD_PASSWORD('newpassword');

You are all set!!

Configuring PHP and MySql on IIS (Windows XP)

These instructions are for the following versions: PHP 5.2.3, MySql 5.0 and IIS 6.0

Steps may change a little with other versions.


Installing PHP

Step 1: Create a folder on C: called "PHP" and unzip the files from the PHP download into that folder.

Step 2: Open IIS6 Manager Right Click -> Default Website -> Properties -> Select Home Directory -> Select Configuration. On Application configuration check to see if .php is in list. If not click "Add". For executable browse to "c:\php" folder and select "php5isapi.dll". Click "OK" and then "OK" again.

Step 3: In the "C:\PHP" folder copy the file "php.ini-recommended" to your C:\WINDOWS folder. Rename this file to "php.ini"

Step 4: Create a test file in the root of your web folder called "phpinfo.php" and insert the code below:

<php
phpinfo();
?>

Step 5: Click Start --> Run and type IISRESET and press enter.

Step 6: Open Internet Explorer and type "http://127.0.0.1/phpinfo.php" and you should see it give you information about the PHP version.

If you see a page with all sorts of information about your PHP version that means your installation was successful.

Configuring MySQL

While running the setup you will need to configur an Instance. You can choose the following options while following the wizard.

MySQL Server Instance Configuration Wizard --> Detailed Configuration --> Developer Machine --> Non-Transactional Database Only --> Decision Support (DSS)/OLAP --> Check Enable TCPIP Netwokring --> Port 3306 --> Standard Character Set --> Install as a Windows Service --> Give it a password --> Execute!!

Configuring PHP for MySQL

Step 1: In the C:\PHP folder copy the file "libmysql.dll" to your C:\WINDOWS\SYSTEM32 folder. Make sure you don't overwrite any existing file in this folder. If file exists, first rename it so you can go back.

Step 2: In the C:\PHP folder copy the file "php.ini-recommended" to your C:\WINDOWS folder. Rename this file to "php.ini" (You already did this.)

Step 3: Edit this file "php.ini" using a text editor like notepad. Find the line where it says "extension_dir = ***". Uncomment this line by removing the preceding semi-colon. and set it to:

extension_dir="c:\php\ext"

Step 4: In the same file "php.ini" also un-comment out 2 other where it says: extension=php_mysql.dll and extension=php_mysqli.dll by removing the semi-colon.

Step 5: Click Start --> Run and type IISRESET and press enter.

You are good to go!!