Skip to content

Instantly share code, notes, and snippets.

View relliv's full-sized avatar
no time for caution

Eyüp relliv

no time for caution
View GitHub Profile
@relliv
relliv / mainwindow.xaml.cs
Created April 28, 2018 19:48
C# Basic App Updater
using System;
using System.ComponentModel;
using System.IO;
using System.Net;
using System.Windows;
namespace Basic_Updater_Example
{
/// <summary>
/// Interaction logic for MainWindow.xaml
@relliv
relliv / updatecheck.php
Last active April 28, 2018 18:07
PHP Basic Update Check Example
<?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){
@relliv
relliv / license-key-generator.php
Created April 28, 2018 08:08
PHP Unique License Key Generator
<?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}/";
@relliv
relliv / .htaccess
Created April 26, 2018 08:34
SEO Sef Link Basic Example
<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>
@relliv
relliv / seflink.php
Created April 26, 2018 06:38
Content Based Sef Link Fonctions
@relliv
relliv / common.php
Last active November 23, 2024 01:41
Secure GET & POST Methods
<?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
@relliv
relliv / connection.php
Created April 26, 2018 05:50
PHP PDO Basic MySQL Database Connection Class
<?php
class Connection{
// database configuration
public $db = 'testa';
public $host = 'localhost';
public $user = 'root';
public $pass = '';
// MySQL Connection Function