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 / peertrade.php
Last active March 25, 2024 12:59
POW (Proof of Work) - Algorithm via PHP Workflow
<?php
//Peer Trade - Proof of Work Algorithm
class peertrade{
function read_all(){
try{
$jsondata = $_chain["handler"]["data"];
$arr_data = json_decode($jsondata,true);
return($arr_data);
}catch(Exception $e){
echo("Error: ".($e->getMessage()));
@binarykore
binarykore / loc.php
Created June 23, 2023 14:56
Lines of Code Counter and JSON API for PHP-based Files, and written via PHP - Working for Vercel and other Web Hosting which allows PHP Runtime for a Singular Directory only, can be used for CLI ..
<?php
class counter{
protected static $_hash = [];
protected static $_loc = [];
protected static $_fcount = [];
protected static $_total = [];
protected static function loc($_filename){
$_loc = @fopen($_filename,"rb");
$_string = fread($_loc,filesize($_filename));
$_count = (count(explode("<br/>",(str_replace(["\n","\r","\s"],["<br/>","<br/>","&nbsp;"],$_string)))));
@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"
]);
@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 / 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 / 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 / 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 / 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 / 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 / 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",