This file contains hidden or 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 | |
session_start(); | |
if (isset($_SESSION['LAST_CALL'])) { | |
$last = strtotime($_SESSION['LAST_CALL']); | |
$curr = strtotime(date("Y-m-d h:i:s")); | |
$sec = abs($last - $curr); | |
if ($sec <= 1) { | |
$data = 'Rate Limit Exceeded'; // rate limit | |
header('Content-Type: application/json'); |
This file contains hidden or 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 | |
function download_remote_file_with_curl($file_url, $save_to) { | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_POST, 0); | |
curl_setopt($ch, CURLOPT_URL, $file_url); | |
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36'); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); | |
$file_content = curl_exec($ch); | |
curl_close($ch); |
This file contains hidden or 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 | |
$day_num=date("j"); //If today is September 29, $day_num=29 | |
$month_num = date("m"); //If today is September 29, $month_num=9 | |
$year = date("Y"); //4-digit year | |
$date_today = getdate(mktime(0,0,0,$month_num,1,$year)); //Returns array of date info for 1st day of this month | |
$month_name = $date_today["month"]; //Example: "September" - to label the Calendar | |
$first_week_day = $date_today["wday"]; //"wday" is 0-6, 0 being Sunday. This is for day 1 of this month |
This file contains hidden or 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 | |
/** | |
* Name: (OTP-Auth) One-Time Password Authentication | |
* Auth: Jason Jersey | |
* Date: 12-24-2017 | |
* Link: https://gist.github.com/icryptix/130fa81ca15925b8553bec8700e5813d | |
*/ | |
/* Verifying whether OTP 1 hour cookie is set */ | |
if(isset($_COOKIE["sitename_otp_cookie"])){ |
This file contains hidden or 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 | |
$user_id = "sharonlaker19"; | |
header("Content-Type: text/plain"); | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, "https://www.facebook.com/messages/t/$user_id"); | |
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); |
This file contains hidden or 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
Go to START MENU | |
Go to RUN | |
Type CMD | |
Run below 6 commands one by one. Copy and paste them one by one into CMD and click ENTER after adding each. | |
(In CMD, you just have to click with your right mouse button to paste) | |
ipconfig /release | |
ipconfig /all | |
ipconfig /flushdns |
This file contains hidden or 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
1. Go to the start menu | |
2. Go to your browser | |
3. Click on it and open it up | |
4. Type this following command in the browsers address bar. This is the same place you normally type in https://www.mydomain.com | |
chrome://net-internals/#sockets | |
5. Click “Flush Socket Pools”, located at the Top of the screen. | |
6. Restart browser |
This file contains hidden or 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
https://support.cloudflare.com/hc/en-us/requests | |
https://support.cloudflare.com/hc/en-us/requests/new |
This file contains hidden or 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
Path to config file | |
/opt/cpanel/ea-php54/root/etc/ | |
pm = ondemand | |
pm.process_idle_timeout = 30s | |
pm.max_children = 10 | |
pm.max_requests = 0 |
This file contains hidden or 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/log/imunify360 |