The date format in the code above is yyyy-mm-dd.<?php
list($bYear, $bMonth, $bDay) = explode("-", $birthday);
$cMonth = date('n');
$cDay = date('j');
$cYear = date('Y');
if(($cMonth >= $bMonth && $cDay >= $bDay) || ($cMonth > $bMonth)) {
$age = $cYear - $bYear;
} else {
$age = 0;
}
echo $age;
?>
list($bYear, $bMonth, $bDay) = explode("-", $birthday);tolist($bMonth, $bDay, $bYear) = explode("/", $birthday);User name: Gmail username
Password: Gmail password:
Incoming mail server: imap.gmail.com
Access point in use: depends on your connection
Mailbox name: depends on your choice
Mailbox type: IMAP4
Secutiy (ports): SSL/TLS
Port: Default
My e-mail address: Gmail e-mail address
User name: Gmail username
Password: Gmail password:
Outgoing mail server: smtp.gmail.com
Access point in use: depends on your connection
Mailbox name: depends on your choice
Secutiy (ports): SSL/TLS
Port: 587
echo '<pre>', print($variable), '</pre>';
<object id="MediaPlayer" width="480" height="360" classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" standby="Loading Windows Media Player components..." type="application/x-oleobject">
<param name="fileame" value="mtv.mpg">
<param name="ShowControls" value="true">
<param name="ShowStatusBar" value="false">
<param name="ShowDisplay" value="false">
<param name="autostart" value="false">
<embed type="application/x-mplayer2" str="mtv.mpg" name="MediaPlayer" width="480" height="360" ShowControls="1" ShowStatusBar="0" ShowDisplay="0" autostart="0"></embed>
</object>
<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="500" width="500">
<param name="src" value="mtv.mpg">
<param name="autoplay" value="false">
<param name="target" value="myself">
<param name="controller" value="false">
<param name="href" value="test.wmv">
<param name="type" value="video/quicktime" height="256" width="320">
<embed src="mtv.mpg" height="500" width="500" autoplay="false" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/" controller="true" href="mtv.mpg" target="myself"></embed>
</object>
Unable to set database connection charset: utf8
function db_set_charset($charset, $collation)
{
return TRUE;
//return @mysql_query("SET NAMES '".$this->escape_str($charset)."' COLLATE '".$this->escape_str($collation)."'", $this->conn_id);
}
function db_set_charset($charset, $collation)
{
if($charset == false || $collation == false)
{
return true;
}
else
{
return @mysql_query("SET NAMES '".$this->escape_str($charset)."' COLLATE '".$this->escape_str($collation)."'", $this->conn_id);
}
}
$db['default']['char_set'] = false;
$db['default']['dbcollat'] = false;
;extension=php_curl.dll
;extension=php_openssl.dll
extension=php_curl.dll
extension=php_openssl.dll
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://www.google.com/");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$output = curl_exec($ch);
curl_close($ch);
$output = str_replace('Google', 'Test', $output);
echo $output;
?>
Mastercard
5341897790221515
5537988621049060
5243922045196558
5153322209529918
5165209231276376
5334676997859858
5181712635852494
5178302989876631
5596412771306202
5234433320094642
VISA 16 digit
4929244915211514
4532093314408141
4716486708213879
4485791832466205
4929238452326396
4716007760893323
4929054317354121
4916180966946373
4929355796422937
4916580586170710
VISA 13 digit
4532194641617
4929933423903
4539080898482
4024007168228
4024007120450
American Express
375036825305981
379612889775990
375591527443753
373893406385168
341565025177924
Discover
6011397261054567
6011947108265873
6011395087227045
Diners Club
30140606700415
38566427390576
30091141757453
enRoute
214960218143805
214981086786806
201407572161861
JCB 15 digit
210094538436428
180004290191166
180098506255716
JCB 16 digit
3158195945475582
3158490241976544
3158712307954408
Voyager
869986290103613
869938875378185
869949834274563
And you will see the this code converted to an acceptable format for blogger.
if(!inWpsDir()) {
$wps_dir = dirname(__FILE__);
error_message("Please cd to the $wps_dir and run install.php");
exit(1);
}
if($err = validate_php_env($reqd_wps_ext)) {
error_message("Missing required PHP extention(s) for WPS Toolkit: $err");
exit(1);
}
Code to create a thumbnail like table in PHP
$colsPerRow = columns to be displayed per row
$contents = usually array or result of a SQL query
<?php
print '<table width="90%" border="0" cellpadding="5" cellspacing="0" align="center">';
$colsPerRow = 6;
$colWidth = (int)(100/$colsPerRow);
$counter = 0;
foreach ($contents as $content)
{
if ($counter % $colsPerRow == 0)
{
print '<tr>';
}
print '<td valign="top" align="center" width="' . $colWidth . '%">$content</td>';
if ($counter % $colsPerRow == $colsPerRow - 1)
{
print '</tr>';
}
$counter += 1;
}
if ($counter % $colsPerRow != 0)
{
while ($counter++ % $colsPerRow != 0)
{
print '<td width="' . $colWidth . '%"> </td>';
}
print '</tr>';
}
print '</table>';
?>
June 2008 July 2008 August 2008 September 2008
Subscribe to Posts [Atom]