Skip to content

Instantly share code, notes, and snippets.

View sivaprabug's full-sized avatar
🏠

Sivaprabu Ganesan sivaprabug

🏠
View GitHub Profile
@sivaprabug
sivaprabug / index.php
Last active October 1, 2019 00:01
Retrieve gmail inbox using PHP scriptplease modify settings in php.inimax_execution_time = 30000extension=php_imap.dll
<?php
/*
max_execution_time = 30000
extension=php_imap.dll
*/
/* connect to gmail */
$hostname = '{imap.gmail.com:993/imap/ssl}INBOX';
@sivaprabug
sivaprabug / dateformatchange.php
Last active December 12, 2015 09:39
Changing the date format using php
<?php
echo date("Y M d", strtotime("20130222"));
echo "<br/><br/>";
echo date("Y/m/d", strtotime("20130222"));
?>
@sivaprabug
sivaprabug / dates.php
Created February 12, 2013 08:20
Change the date format and store in DB
<?php
$conn=mysql_connect("localhost","root","kirti123") ;
if(!$conn)
{
die('connection Error' . mysql_error());
}
// DATE CONVERSION
@sivaprabug
sivaprabug / default.php
Created February 27, 2013 15:04
How to how PRODUCT-SKU in product page of Virtuemart 2 in Joomla
<?php
// Manufacturer of the Product
if (VmConfig::get('show_manufacturers', 1) && !empty($this->product->virtuemart_manufacturer_id)) {
echo $this->loadTemplate('manufacturer');
}
?>
@sivaprabug
sivaprabug / default-replace.php
Created February 27, 2013 15:07
Show SKU Field in product page of Virtuemart 2
<div class="skuNumber"><br />
<?php echo JText::_('COM_VIRTUEMART_CART_SKU') ?>: <?php echo $this->product->product_sku; ?>
</div>
@sivaprabug
sivaprabug / tblcitylist.sql
Created April 8, 2013 12:49
MySQL database of Indian Cities and states,latitude and longitude..
-- 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";
@sivaprabug
sivaprabug / googleLineChart.php
Last active February 26, 2016 12:13
Line Chart using google chart API in 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 ],
@sivaprabug
sivaprabug / splitYoutubeLink.php
Last active December 18, 2015 05:39
Separate the YouTube video link from a given paragraph...
@sivaprabug
sivaprabug / MysqliEmpty.php
Created August 15, 2013 00:56
mysqli returns empty result - how to display ?
<?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
@sivaprabug
sivaprabug / A-Pen-by-Sivaprabu-Ganesan.markdown
Created December 26, 2013 09:49
A Pen by Sivaprabu Ganesan.