Skip to content

Instantly share code, notes, and snippets.

Sivaprabu Ganesan gsivaprabu

Block or report user

Report or block gsivaprabu

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@gsivaprabu
gsivaprabu / index.php
Last active Oct 1, 2019
Retrieve gmail inbox using PHP scriptplease modify settings in php.inimax_execution_time = 30000extension=php_imap.dll
View index.php
<?php
/*
max_execution_time = 30000
extension=php_imap.dll
*/
/* connect to gmail */
$hostname = '{imap.gmail.com:993/imap/ssl}INBOX';
@gsivaprabu
gsivaprabu / dateformatchange.php
Last active Dec 12, 2015
Changing the date format using php
View dateformatchange.php
<?php
echo date("Y M d", strtotime("20130222"));
echo "<br/><br/>";
echo date("Y/m/d", strtotime("20130222"));
?>
@gsivaprabu
gsivaprabu / dates.php
Created Feb 12, 2013
Change the date format and store in DB
View dates.php
<?php
$conn=mysql_connect("localhost","root","kirti123") ;
if(!$conn)
{
die('connection Error' . mysql_error());
}
// DATE CONVERSION
@gsivaprabu
gsivaprabu / default.php
Created Feb 27, 2013
How to how PRODUCT-SKU in product page of Virtuemart 2 in Joomla
View default.php
<?php
// Manufacturer of the Product
if (VmConfig::get('show_manufacturers', 1) && !empty($this->product->virtuemart_manufacturer_id)) {
echo $this->loadTemplate('manufacturer');
}
?>
@gsivaprabu
gsivaprabu / default-replace.php
Created Feb 27, 2013
Show SKU Field in product page of Virtuemart 2
View default-replace.php
<div class="skuNumber"><br />
<?php echo JText::_('COM_VIRTUEMART_CART_SKU') ?>: <?php echo $this->product->product_sku; ?>
</div>
@gsivaprabu
gsivaprabu / tblcitylist.sql
Created Apr 8, 2013
MySQL database of Indian Cities and states,latitude and longitude..
View tblcitylist.sql
-- phpMyAdmin SQL Dump
-- version 3.5.2.2
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Apr 08, 2013 at 02:48 PM
-- Server version: 5.5.27
-- PHP Version: 5.4.7
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
@gsivaprabu
gsivaprabu / googleLineChart.php
Last active Feb 26, 2016
Line Chart using google chart API in PHP
View googleLineChart.php
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load("visualization", "1", {packages:["corechart"]});
google.setOnLoadCallback(drawChart);
function drawChart() {
var data = google.visualization.arrayToDataTable([
['Year', 'AIDMK', 'DMK','INC','CPI','CPI-M','PMK','MDMK','DMDK'],
['1977', 130, 48, 27, 5 , 12, 0 , 0, 0 ],
['1980', 129, 37, 31, 9 , 11, 0, 0, 0 ],
@gsivaprabu
gsivaprabu / splitYoutubeLink.php
Last active Dec 18, 2015
Separate the YouTube video link from a given paragraph...
View splitYoutubeLink.php
@gsivaprabu
gsivaprabu / MysqliEmpty.php
Created Aug 15, 2013
mysqli returns empty result - how to display ?
View MysqliEmpty.php
<?php
$q2 = "SELECT FIELD FROM TABLENAME WHERE ID = 1;";
$con = new mysqli($server, $user, $pass);
if (mysqli_connect_errno())
{
$error = mysqli_connect_error();
exit();
}
else
You can’t perform that action at this time.