This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Clash of Clans Official API Integration on PHP | |
//Refer : http://sivasankar.in/ | |
$curl = curl_init(); | |
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); | |
curl_setopt($curl, CURLOPT_URL, 'https://api.clashofclans.com/v1/clans/%23LRQ0PJL9'); //Clan Tag | |
curl_setopt($curl, CURLOPT_HTTPHEADER, array( | |
'Accept: application/json', | |
'authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiIsImtpZCI6IjI4YTMxOGY3LTAwMDAtYTFlYi03ZmExLTJjNzQzM2M2Y2NhNSJ9.eyJpc3MiOiJzdXBlcmNlbGwiLCJhdWQiOiJzdXBlcmNlbGw6Z2FtZWFwaSIsImp0aSI6ImVkM2UzMjEwLTVkYmItNDQ0Ni05YzA3LTZhNjhmMDExMTc1NCIsImlhdCI6MTQ1NjUwOTI4NCwic3ViIjoiZGV2ZWxvcGVyL2Y4ZTA0MGUwLTcxNzYtMjgzYi1jY2YwLTc5NzkyMWYzN2NiYSIsInNjb3BlcyI6WyJjbGFzaCJdLCJsaW1pdHMiOlt7InRpZXIiOiJkZXZlbG9wZXIvc2lsdmVyIiwidHlwZSI6InRocm90dGxpbmcifSx7ImNpZHJzIjpbIjEyMi4xNzQuMTgzLjIxMiJdLCJ0eXBlIjoiY2xpZW50In1dfQ.x_Nhtmg6MPyEGjnMNqpG0mTwAwv8x2kAuvcnvsAGN2u1AbXFTusF1mBJvqpbsHCM7eccKFySug9BKdlOSMV_9Q' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var moment = require('moment-timezone'); // moment-timezone | |
console.log(moment.tz.names()); // Get list of all available time zone names |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<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"> | |
<title>Dynamic Time Zones Dropdown Using Moment.js</title> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Contact Form 7 - Hook For MSG91 */ | |
function msg91_api($cf7) { | |
$wpcf = WPCF7_ContactForm::get_current(); | |
if ($wpcf->id() == 4) { | |
if (get_option('enable') == '1') { | |
$authKey = get_option('authKey'); | |
$mobiles = get_option('mobiles'); | |
$senderId = get_option('senderId'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require('express'); | |
var mongoose = require('mongoose'); | |
var gridfs = require('gridfs-stream'); | |
var fs = require('fs'); | |
var db_filename = "demo.jpg"; | |
var local_file = "./gridfs.jpg"; | |
mongoose.connect('mongodb://localhost:27017/test', { useNewUrlParser: true }); | |
mongoose.Promise = global.Promise; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var express = require('express'); | |
var { google } = require('googleapis'); | |
// API keys, Client ID and Client Secret @ https://code.google.com/apis/console | |
var GAPI = "AIzaSyBheQiEQ_NYpsFugde-jb8hmC7FBAFEVHI"; | |
var CLIENT_ID = "507857393893-tmnp49jq8of3en7m81dqdidedupris8d.apps.googleusercontent.com"; | |
var CLIENT_SECRET = "aLHvXDEV_I_YpAA4Y9tl1tdg"; | |
var REDIRECT_URL = "http://localhost:3000/oauth2callback"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
<meta name="description" content="List Posts From WordPress Using REST API With cURL In PHP"> | |
<title>Demo - WordPress REST API</title> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"> | |
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express'); | |
const cluster = require('cluster'); | |
const http = require('http'); | |
const numCPUs = require('os').cpus().length; | |
if (cluster.isMaster) { | |
console.log(`Master ${process.pid} is running`); | |
// Fork workers. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var mongoose = require('mongoose'); | |
var express = require('express'); | |
// Connect to MongoDB Using Mongoose ODM | |
mongoose.connect('mongodb://localhost:27017/integration_test', { useNewUrlParser: true }); | |
// Listen For Mongoose Connection Error | |
mongoose.connection.on("error", function (err) { console.error('Failed to Connect MongoDB'); }); | |
// Listen For Mongoose Disconnection |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var array = [ | |
[[1], [2], [3], [4]], | |
[[5], [6], [7], [8]], | |
[[9], [10], [11], [12]], | |
[[13], [14], [15], [16]], | |
[[17], [18], [19], [20]] | |
]; | |
function printAllDgl(array) { | |
var i = 0, j = 0, output = []; |
OlderNewer