Archive for February, 2010

Im selling Fortigate 60b for only 15,000 pesos call or text 09237040600

Thursday, February 25th, 2010

fortigate 60b

Hello everyone, Im selling a Fortigate 60b for only 15,000.00 pesos only, slightly used, 5mos old, used only for two months.

Fortigate 60b is a firewall and security solution within your reach, now with more reason to have one Im selling it for 15,000.00 only.

For more information please call or text me 0923 7040600 or call 3211440 Manila

Look for Regin

UPDATE: SOLD!

Covert amount to US dollar via PHP and Yahoo Finance Rates

Tuesday, February 23rd, 2010

PHP function to Auto automatically convert and display dollar equivalent of your peso value.

Rates via Yahoo Finance, easy to use function, for everybody…

Read on…

CONST YAHOO_URL = 'http://finance.yahoo.com/d/quotes.csv?e=.csv&f=sl1d1t1&s=%s%s=X';
function yahoo_convert($a,$from,$to){
   $fo = @fopen(sprintf(self::YAHOO_URL,$from,$to), 'r');
   if ($fo){
      $response = fgets($fo, 4096);
	fclose($fo);
	array = explode(',',$response);
	if(strval($array[1]) > 0) {
	   return strval($a)*strval($array[1]);
	}
   }
   return false;
}

To use

<?php
echo yahoo_convert(1,USD,PHP);
?>

For questions / help send me a message of just comment for help instructions…

Validating email via regular expression

Tuesday, February 23rd, 2010

You have an online form.

You want to validate every field,  especially email input fields.

You do not want just check if its has a value of not, but also if its in the right format (e.g. email@email.com).

If you answered yes to all of these then the function below if perfect for you.

Check it out…

function validate_email($email){
     if(!eregi("^([[:alnum:]]|_|\.|-)+@([[:alnum:]]|\.|-)+(\.)([a-z]{2,4})$", $email)){
	  return $error=1;
     }
}

Fell free to abuse…

Formatting output of datetime MySQL value

Monday, February 22nd, 2010

I wanted to give a new output for those ugly looking datetime values in MySQL, which we get by using NOW() function in INSERT.

Why? because it pretty darn ugly, unpresentable and robot like.

Ok ok, maybe that’s description overkill for datetime, but how would you like this “2010-02-14 11:12:58″ to look like this “February 14, 2010″.

Pretty readable that the later huh.

Ok enough blah blah, here is my function, feel free to abuse it. :)

function Format_Date($date){
	$mos=array('01'=>January,'02'=>February,'03'=>March, '04'=>April, '05'=>May, '06'=>June, '07'=>July, '08'=>August, '09'=>September, '10'=>October, '11'=>Novermber, '12'=>December);
	$d = explode(" ",$date);
	$n = explode("-",$d[0]);
	return $mos[$n[1]].' '.$n[2].', '.$n[0].' '.$d[1];
}

To use this function:

$query=mysql_query("SELECT datetime FROM table"); //2010-02-14 12:11:03
while($row=mysql_fetch_assoc($query)){
echo Format_Date($row[datetime]);//February 14, 2010
}

Easy right? fell free to post your customizatios :)

How to login multiple users on Yahoo Messenger simultaneously with three easy steps

Sunday, February 21st, 2010

Chances are  you have more than one (1) yahoo ID, and you are tired of signing in and out whenever you want to use the other.  And you want to do this in three simple steps.

You came into the right place…

Here I will post the step by step guide / how to do this in windows.

Step 1:

Go to Start->Run then type regedit, click ok.

Use Yahoo Messenger multiple=

a new window will pop up named registry editor

Step 2:

Go to folder software->yahoo->pager->test

Right click on the right panel click new->DWORD value

registry editor

A new file will be created.
Step 3:

Rename that new file as Plural.

after renaming double click to change its value to 1.

Now your ready to use YM simultaneously with diff Yahoo ID, to doso sign in as long as you like, as many as you like, as long as your computer memory permits you :) .

ENJOY…

taskbar