Skip to content

Instantly share code, notes, and snippets.

View eboominathan's full-sized avatar
🎯
Focusing

Boominathan Elango eboominathan

🎯
Focusing
View GitHub Profile
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
@eboominathan
eboominathan / myajax.php
Created January 31, 2020 04:29
Allow ajax from outside in PHP
if (isset($_SERVER['HTTP_ORIGIN'])){
header("Access-Control-Allow-Origin: {$_SERVER['HTTP_ORIGIN']}");
header('Access-Control-Allow-Credentials: true');
header('Access-Control-Max-Age: 86400'); // cache for 1 day
}
// Access-Control headers are received during OPTIONS requests
if ($_SERVER['REQUEST_METHOD'] == 'OPTIONS')
{
@eboominathan
eboominathan / Credentials
Last active December 3, 2019 05:30
Credentials & Roles
YouthHub
=================
1.administrator (All Permission ) -- Superadmin
2.bayofplentyregion (Restricted permissions )
3 - aucklandnorthshore (Restricted permissions )
4 - aucklandaucklandcityopsadmin1 ( Permission to creates Admin roles & permission rights ) -- Superamdin
5 - rotoruadistrict_opsadmin_1_angel_1 ( Angel admin Organize the youth )
6 - ricky pointing -- Youth
7)Thomas Jacob -- Youth
@eboominathan
eboominathan / ragul.php
Created October 12, 2018 15:48
Sample API
/* API */
Public function get_id(){
$result = array();
/* Check data already Present or not */
$check_data = $this->db->order_by('id','desc')->get('student_list')->row_array();
if(!empty($check_data)){ /* Already have data */
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
@eboominathan
eboominathan / common_helper.php
Created December 30, 2017 05:52
Common Helper
<?php
function converToTz($time="",$toTz='',$fromTz='')
{
$date = new DateTime($time, new DateTimeZone($fromTz));
$date->setTimezone(new DateTimeZone($toTz));
$time= $date->format('Y-m-d H:i:s');
return $time;
}
@eboominathan
eboominathan / Address
Created December 5, 2017 12:17
Guru Prasath
A11-3A Zeva Residence,
Persiaran Pinggiran Putra,
Taman Pingguran Putra,
Seri Kembangan, Selangor,
Malaysia – 43300.
@eboominathan
eboominathan / tamil.php
Created September 18, 2017 05:56
Tamil Typewriting using Google
<!DOCTYPE html>
<html>
<head>
<title>Tamil Font </title>
</head>
<body>
<input type="text" name="" id="tamil">
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
@eboominathan
eboominathan / sample_model.php
Created September 13, 2017 01:45
Datatable Sample model
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Customer_model extends CI_Model {
public $variable;
public function __construct()
{
parent::__construct();
@eboominathan
eboominathan / get_location.php
Created April 8, 2017 13:46
Get the location details by using latitude and longitude
<?php
$lattitude = 11.016844;
$longitude = 76.955832;
$geocode=file_get_contents('http://maps.googleapis.com/maps/api/geocode/json?latlng='.$lattitude.','.$longitude.'&sensor=false');
$output= json_decode($geocode);
echo $output->results[0]->formatted_address;
?>