Skip to content

Instantly share code, notes, and snippets.

View PHP - URL to Breadcrumbs
function url2breadcrumb($url,$include_base=1,$home_url=false){
if(empty($url)){
return;
}
$base = parse_url($url);
$base = $base['scheme'].'://'.$base['host'].'/';
$crumbs = rtrim(parse_url($url,PHP_URL_PATH),'_');
$crumbs = array_filter(explode("/",$crumbs));
$link = '';
View PHP Visitor Counter Without Database
<?php
/*-----------------------------------------------------------
| @Visitor Counter without using database
| github: https://gist.github.com/RahulSaini91/a09c8f8e6cebf4c66e227699f5860df3
| Save visiter number in cookies
|
| Access the visitor count
| echo the_counter();
|
View Gmail SMTP with phpmailer
$mail = new PHPMailer(); // create a new object
$mail->IsSMTP(); // enable SMTP
$mail->SMTPDebug = 1; // debugging: 1 = errors and messages, 2 = messages only
$mail->SMTPAuth = true; // authentication enabled
$mail->SMTPSecure = 'ssl'; // secure transfer enabled REQUIRED for Gmail
$mail->Host = "smtp.gmail.com";
$mail->Port = 465; // or 587
$mail->IsHTML(true);
$mail->Username = "email@gmail.com";
$mail->Password = "password";
View PHP Contact Form
<?php error_reporting(0); session_start(); $input = input(); date_default_timezone_set('Asia/Kolkata'); $mail = array();
/*
******************************************
********* READ FULL TUTORIAL AT: ********
***** http://tutorials.weforit.com ******
******************************************
*/
/*
View scripts.js
//functions
function setCookie(cname, cvalue, exdays) {
var d = new Date();
d.setTime(d.getTime() + (exdays*24*60*60*1000));
var expires = &quot;expires=&quot;+ d.toUTCString();
document.cookie = cname + &quot;=&quot; + cvalue + &quot;;&quot; + expires + &quot;;path=/&quot;;
}
View CSS Cards
<link href="https://fonts.googleapis.com/css?family=Raleway" rel="stylesheet">
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
<style>
body{
background:#efefef;
}
.text-color{
color:#fff;
@RahulSaini91
RahulSaini91 / CSS - Basic Utility
Last active Nov 27, 2017
The CSS has basic customization class e.g: Font Bold, italic, underline and etc.
View CSS - Basic Utility
<style>
/* customize font style */
.text{
font-size:14px;
font-family:times new roman;
}
.text-normal{
font-weight:normal;
text-decoration: none;
font-style: normal;
View [www.rahulsaini.co.in] - Apache htaccess: Redirect HTTP to HTTPS
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example\.com [NC]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.example.com/$1 [R,L]
@RahulSaini91
RahulSaini91 / [MeMyCodes.tk] - [Method 2]How to Get Direct Download Link of Any Movie
Created Feb 27, 2017
[MeMyCodes.tk] - How to Get Direct Download Link of Any Movie, Method 2 - For full details please visit: memycodes.blogspot.com
@RahulSaini91
RahulSaini91 / [MeMyCodes.tk] - How to Get Direct Download Link of Any Movie
Created Feb 27, 2017
[MeMyCodes.tk] - How to Get Direct Download Link of Any Movie, For full details please visit: memycodes.blogspot.com
View [MeMyCodes.tk] - How to Get Direct Download Link of Any Movie