Read email from cpanel with imap in php
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”> <html xmlns=”http://www.w3.org/1999/xhtml”> <head>...
View ArticleIncoming email read with php
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”> <html xmlns=”http://www.w3.org/1999/xhtml”> <head>...
View ArticleRSS reader/RSS display with PHP
<?php header(“Content-type: text/xml”); ?> <?php echo “<?xml version=\”1.0\” encoding=\”UTF-8\”?>”; ?> <rss version=”2.0″> <channel> <title>Website Title...
View ArticleRetrieve And Update Mysql username and Password with SQL
List all the users: SELECT * FROM mysql.user; Reset password; UPDATE mysql.user SET Password=PASSWORD('[password]') WHERE User='[username]';
View ArticleGet content from another site with Curl and PHP
<?php function get_string_between($string, $start, $end) { $string = ” “.$string; $ini = strpos($string,$start); if ($ini == 0) return “”; $ini += strlen($start); $len = strpos($string,$end,$ini) –...
View ArticleImage to Binary Conversion with PHP
<?php $content=file_get_contents(“tkdown.gif”); $encode=base64_encode($content); echo “Encoded Data:”.$encode; ?>
View ArticleConversion Of Binary Data To Image File In PHP
< ?php $con=file_get_contents(“tkdown.gif”); $en=base64_encode($con); $mime=’image/gif’; $binary_data=’data:’ . $mime . ‘;base64,’ . $en ; ? > <img src=”<?php echo $binary_data; ?>”...
View ArticleGmail rss feed with unread email in PHP
<?php $username = “gmail username”; $password = “gmail password”; // Initialise cURL $c = curl_init(‘https://gmail.google.com/gmail/feed/atom’); $headers = array( “Host: gmail.google.com”,...
View ArticleCalculate Date Difference and calculate year,month in PHP
<?php function dateDiff($dformat, $endDate, $beginDate) { $split_endDate=split(” “,$endDate ); $split_beginDate=split(” “,$beginDate ); $date_parts1=explode($dformat, $split_beginDate[0]);...
View ArticleGoogle Maps with PHP and Javascript
<?php class GoogleMaps { var $APIKey = “ABQIAAAASTe3RGQOzgfE_7pgalxCWxTxwC-FTRouMUU4URT3KGgoa5PSihROzcGmVudxV_XFjm17uSpKPwoCYw”; function SetLocation($Location) { $this->Location = $Location; }...
View Article