Skip to content

Instantly share code, notes, and snippets.

View masgeek's full-sized avatar
🪁
Adapting

Sammy M masgeek

🪁
Adapting
View GitHub Profile
<?php
/**
* Created by PhpStorm.
* User: smbar
* Date: 09-Aug-18
* Time: 10:12 AM
*/
/**
* @param $array
@masgeek
masgeek / index.php
Created June 7, 2017 06:58 — forked from abel-masila/index.php
A simple USSD registration application written in PHP
<?php
/* Simple sample USSD registration application
* USSD gateway that is being used is Africa's Talking USSD gateway
*/
// Print the response as plain text so that the gateway can read it
header('Content-type: text/plain');
/* local db configuration */
$dsn = 'mysql:dbname=dbname;host=127.0.0.1;'; //database name
<?php
// Resource: http://stackoverflow.com/questions/4329260/cross-platform-php-to-c-sharp-net-encryption-decryption-with-rijndael
$iv = "45287112549354892144548565456541";
$key = "anjueolkdiwpoida";
$clear = "2310296|340105";
$encrypted = "B/DrahtonRfOMOgkCTcZRcuOdlpc68uKrNp9oCBpchY=";
$block = mcrypt_get_block_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_CBC);