Skip to content

Instantly share code, notes, and snippets.

View binarykore's full-sized avatar
🏠
Living under the Shadows of my Game

Digital Kore binarykore

🏠
Living under the Shadows of my Game
View GitHub Profile
@binarykore
binarykore / session_starter.php
Created September 11, 2022 19:54
Check if PHP session has already started..
<?php
if(session_status() == PHP_SESSION_NONE){
session_start();
}//PHP >= 5.4.0, PHP 7
if(session_id() == ''){
session_start();
}//PHP < 5.4.0
?>
@binarykore
binarykore / discord.php
Last active May 26, 2023 10:16
A simple discord push notification using PHP...
<?php
$_webhook = "webhook_url";
$_blob = json_encode(["content" => (md5(time())),"username" => "username_to_publish"]);
$_discord = curl_init();
curl_setopt($_discord,CURLOPT_URL,$_webhook);
curl_setopt($_discord,CURLOPT_POST,1);
curl_setopt($_discord,CURLOPT_HTTPHEADER,["Content-Type:Application/JSON"]);
curl_setopt($_discord,CURLOPT_POSTFIELDS,$_blob);
curl_setopt($_discord,CURLOPT_SSL_VERIFYPEER,0);
curl_setopt($_discord,CURLOPT_RETURNTRANSFER,1);
@binarykore
binarykore / whois.php
Created September 16, 2022 04:48
WhoIS Servers
private $_servers = [
"ac" => "whois.nic.ac",
"ae" => "whois.aeda.net.ae",
"aero" => "whois.aero",
"af" => "whois.nic.af",
"ag" => "whois.nic.ag",
"al" => "whois.ripe.net",
"am" => "whois.amnic.net",
"as" => "whois.nic.as",
"asia" => "whois.nic.asia",
@binarykore
binarykore / vita.md
Last active November 7, 2022 17:00
PS Vita (Model Number Indicator)
  • 1000 - Japan (WiFi)
  • 1100 - Japan (3G)
  • 1001 - USA (WiFi)
  • 1101 - USA (3G)
  • 1002 - Australia / New Zealand (WiFi)
  • 1102 - Australia / New Zealand (3G)
  • 1003 - UK (WiFi)
  • 1103 - UK (3G)
  • 1004 - EU (WiFi)
  • 1104 - EU (3G)
@binarykore
binarykore / randomwheel.c
Last active May 10, 2024 19:09
Random Wheel Generator using C Language..
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
void delay(int nos){
int ms = 1000 * nos;
clock_t st = clock();
while(clock() < st + ms);
}
@binarykore
binarykore / forex.php
Last active July 30, 2023 09:51
Forex Exchange Rates (Regular Expression) - Sample..
<?php
protected static function expression($_currency = []){
$_request = [];
$_request["global"] = "/\<td\sclass\=\'rtRates\'\>\<a\shref\=\'(http|https)\:\/\/([a-z\-.]+)\/([a-z]+)\/([a-zA-Z0-9?=\;&\_]+)\'\>([0-9.]+)\<\/a\>\<\/td\>/i";
$_request["switch"] = "/\<td\sclass\=\'rtRates\'\>\<a\shref\=\'(http|https)\:\/\/([a-z\-.]+)\/([a-z]+)\/\?from\=".$_currency["from"]."\&amp\;to\=".$_currency["to"]."\'\>([0-9.]+)\<\/a\>\<\/td\>/i";
return($_request["switch"]);
}//
//Regular Expression for getting Forex Declaration Values..
?>
@binarykore
binarykore / shadowbreaker.php
Created April 5, 2023 05:47
Shadow Breaker - 15 Digit IMEI Generator
<?php
//Shadow Breaker - 15 Digit IMEI Generator..
class shadow{
//7 + 8 = 15 Digit IMEI..
public static function breaker(){
$_byte = NULL;
$_entryPoint = "8607020";
$_count = "99999999";
$_digits = count(str_split($_count,1));
$_hash = [];
@binarykore
binarykore / foodchain.php
Last active April 10, 2023 07:55
PHP Example of Food Chain, using Shadow Formula..
<?php
class shadow{
//Beak = Variable..
//Prey = Function..
//Protected and Private = Accessed within the Scope..
//Public = Accessed outside the Scope..
public static $beak = "eagles";
public static function prey(){
self::$beak = "snakes";
return(self::$beak);
@binarykore
binarykore / interpolation.php
Last active May 26, 2023 10:33
String Interpolation using PHP Regular Expression and Preg_Replace Function..
<?php
$_string = "username=admin";
$_string = preg_replace("/username\=(\w+)/",'<li>${1}</li>',$_string);
echo($_string."\r\n");
//String Interpolation using PHP Regular Expression..
?>
@binarykore
binarykore / mailchimp.php
Created June 16, 2023 08:24
Mailchimp Subscribe Feature for Devs / Programmers made using PHP ..
<?php
$_emailaddress = readline("Email Address:\r\n");
$_listid = "Database or List ID";
$_apikey = "Mailchimp API Key";
$_datacenter = substr($_apikey,strpos($_apikey,"-")+1);
$_url = "https://".($_datacenter).".api.mailchimp.com/3.0/lists/".($_listid)."/members";
$_data = json_encode([
"email_address" => $_emailaddress,
"status" => "subscribed"
]);