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
using System; | |
using System.ComponentModel; | |
using System.IO; | |
using System.Net; | |
using System.Windows; | |
namespace Basic_Updater_Example | |
{ | |
/// <summary> | |
/// Interaction logic for MainWindow.xaml |
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 | |
// app current version | |
$appversiyon = "2.2"; | |
if($_GET["version"]){ | |
// GET client vresion | |
$client_version = $_GET["version"]; | |
// compare with app version | |
if($appversiyon > $client_version){ |
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 | |
// some input and date | |
$date = date("Y-m-d H:i:s"); | |
$hashsubject = "[email protected] - {$date}"; | |
$hash = strtoupper(hash('sha512', $hashsubject)); | |
// parse hash with pettern | |
$blocksize = 5; | |
$licpettern = "/(([A-Z0-9]{".$blocksize."})){5}/"; |
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
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
# POSTS URL | |
RewriteRule ^([0-9-]+)/([0-9-A-z-]+)/([0-9-A-z-]+)(.*)$ post.php?date=$1&category=$2&sef_link=$3 | |
</IfModule> |
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 | |
/*--------------------- SEF Link ----------------- START */ | |
// Conversation title to better link string | |
public function sefLink($str){ | |
$str = $this->parentSefLink($str); | |
if ($str !== mb_convert_encoding(mb_convert_encoding($str, 'UTF-32', 'UTF-8'), 'UTF-8', 'UTF-32')) | |
$str = mb_convert_encoding($str, 'UTF-8', mb_detect_encoding($str)); | |
$str = htmlentities($str, ENT_NOQUOTES, 'UTF-8'); | |
$str = preg_replace('`&([a-z]{1,2})(acute|uml|circ|grave|ring|cedil|slash|tilde|caron|lig);`i', '1', $str); |
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 | |
class Common | |
{ | |
/*--------------------- $_GET & $_POST ----------------- START */ | |
/** | |
* Get $_GET content, array or array item in filtered way | |
* | |
* @param object $parameter could be array or array item |
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 | |
class Connection{ | |
// database configuration | |
public $db = 'testa'; | |
public $host = 'localhost'; | |
public $user = 'root'; | |
public $pass = ''; | |
// MySQL Connection Function |
NewerOlder