Dynamic subdomains using htaccess This will render abcd.yourwebsite.com into yourwebsite.com/wor_out.php?url=abc
Tag Archives: PHP
php Cannot modify header information – headers already sent by FIX
Buffers output and eliminates problem with spaces/line breaks at the beginning/end of files. Make sure to place ob_start(); before header(); is called. <?php ob_start(); header(“Location: somepage.php”); //Redirect ob_end_flush(); exit; ?> [ad code=1 align=center]
RSS date PHP
Date formating rss pubDateThe publication date for the content in the channel. For example, the New York Times publishes on a daily basis, the publication date flips once every 24 hours. That’s when the pubDate of the channel changes. All date-times in RSS conform to the Date and Time Specification of RFC 822, with the …
PHP html var
$htmlvar=<<<HTML clean html code here <html><body><head></head><h1>Hello world</h1></body></html> HTML; echo $htmlvar;
php strtotime
echo ‘Today day: ‘. date(‘Ymd’) .”\n”; echo date(‘Ymd’, strtotime(‘-1 day’)); echo strtotime(“now”), “\n”; echo strtotime(“10 September 2000”), “\n”; echo strtotime(“+1 day”), “\n”; echo strtotime(“+1 week”), “\n”; echo strtotime(“+1 week 2 days 4 hours 2 seconds”), “\n”; echo strtotime(“next Thursday”), “\n”; echo strtotime(“last Monday”), “\n”; echo ‘Today day: ‘. date(‘Ymd’) .”\n”; $dateprev=date(‘Ymd’, strtotime($date. ‘-1 day’));
Dates in PHP and Mysql
$mysqldate = date( ‘Y-m-d H:i:s’, $phpdate ); $phpdate = strtotime( $mysqldate );