{"id":621,"date":"2013-10-17T21:01:57","date_gmt":"2013-10-17T18:01:57","guid":{"rendered":"http:\/\/www.gencnesil.org\/?p=621"},"modified":"2014-03-20T15:15:38","modified_gmt":"2014-03-20T13:15:38","slug":"php-script-lisanslama-ornegi","status":"publish","type":"post","link":"https:\/\/gncz.net\/index.php\/php-script-lisanslama-ornegi.html","title":{"rendered":"PHP Script Lisanslama \u00d6rne\u011fi"},"content":{"rendered":"<p>Baz\u0131 yerlerde bu \u00f6rnekleri $_SERVER de\u011fi\u015fkenine g\u00f6re yapt\u0131klar\u0131n\u0131 g\u00f6rd\u00fc\u011f\u00fcm i\u00e7in i\u00e7ime daha \u00e7ok sinen haliyle bir \u00f6rnek yapmak istedim. \u0130\u00e7ime sinmeme sebebi kolay m\u00fcdahele edilebilir olmas\u0131d\u0131r. <!--more-->Siz kodlar\u0131 ne kadar kilitlerseniz kilitleyin<br \/>\n$_SERVER[&#8216; SERVER_NAME&#8217;]=$_SERVER[&#8216;HTTP_HOST&#8217;]=&#8217;www.cnylmz.net&#8217;;<br \/>\ngibi bir sat\u0131r kullan\u0131ld\u0131\u011f\u0131nda, lisans sisteminiz i\u015flevini tamamen kaybeder. \u0130\u00e7ime sinmesi i\u00e7in, bu m\u00fcdaheleyi olabildi\u011fince zorla\u015ft\u0131rmak gerekiyor.<\/p>\n<p>&nbsp;<\/p>\n<p>M\u00fcdaheleyi zorla\u015ft\u0131rmak i\u00e7inse, de\u011fi\u015fken yerine fonksiyon kullanma taraftar\u0131y\u0131m. getenv() fonksiyonu, ayn\u0131 $_SERVER de\u011fi\u015fkeni gibi \u00f6n tan\u0131ml\u0131 ortam de\u011fi\u015fkenlerine ula\u015fmak i\u00e7in kullan\u0131l\u0131r, g\u00fczel yan\u0131 ise putenv() fonksiyonunun safe_mod(g\u00fcvenli bi\u00e7im) se\u00e7ene\u011finde \u00e7al\u0131\u015fan sunucularda \u00e7al\u0131\u015fmamas\u0131. O y\u00fczden bi ka\u00e7 kontrol ile kolay lisans beti\u011fini haz\u0131rlayabiliriz.<\/p>\n<p>&nbsp;<\/p>\n<div>\n<div>PHP kodu<\/div>\n<div><\/div>\n<blockquote>\n<pre class=\"lang:default decode:true \">        if(ini_get('safe_mode')==true)\r\n        die('G\u00fcvenli\u011finiz i\u00e7in sunucu \"SAFE MODE(G\u00fcvenli bi\u00e7im)\" durumunda \u00e7al\u0131\u015ft\u0131r\u0131lmal\u0131d\u0131r');\r\n        require('lisans.php');\/\/ i\u00e7inde $lisans_anahtar de\u011fi\u015fkeni var\r\n        $lisans['site']=getenv('HTTP_HOST');\r\n        if (substr($lisans['site'], 0, 4) == \"www.\")\r\n        $lisans['site']=substr($lisans['site'],4);\r\n        $lisans['hash']=wordwrap(strtoupper(md5($lisans['site'])),4,'-',true);\r\n        if($lisans['hash']!==$lisans_anahtar)\r\n        die('Lisans anahtar\u0131n\u0131z bu site i\u00e7in ge\u00e7erli de\u011fil');\r\n        else\r\n        unset($lisans);\r\n        \/*\r\n        buras\u0131 da sizin php kodlar\u0131n\u0131z\r\n        *\/<\/pre>\n<p>&nbsp;<\/p><\/blockquote>\n<\/div>\n<p>ve bu kodlar\u0131 da ioncube, zend veya benzeri programlarla encode ettikten sonra i\u015finiz bitmi\u015f demektir.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Baz\u0131 yerlerde bu \u00f6rnekleri $_SERVER de\u011fi\u015fkenine g\u00f6re yapt\u0131klar\u0131n\u0131 g\u00f6rd\u00fc\u011f\u00fcm i\u00e7in i\u00e7ime daha \u00e7ok sinen haliyle bir \u00f6rnek yapmak istedim. \u0130\u00e7ime sinmeme sebebi kolay m\u00fcdahele edilebilir olmas\u0131d\u0131r.<\/p>\n","protected":false},"author":1,"featured_media":720,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[20],"tags":[39],"_links":{"self":[{"href":"https:\/\/gncz.net\/index.php\/wp-json\/wp\/v2\/posts\/621"}],"collection":[{"href":"https:\/\/gncz.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gncz.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gncz.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gncz.net\/index.php\/wp-json\/wp\/v2\/comments?post=621"}],"version-history":[{"count":2,"href":"https:\/\/gncz.net\/index.php\/wp-json\/wp\/v2\/posts\/621\/revisions"}],"predecessor-version":[{"id":780,"href":"https:\/\/gncz.net\/index.php\/wp-json\/wp\/v2\/posts\/621\/revisions\/780"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/gncz.net\/index.php\/wp-json\/wp\/v2\/media\/720"}],"wp:attachment":[{"href":"https:\/\/gncz.net\/index.php\/wp-json\/wp\/v2\/media?parent=621"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gncz.net\/index.php\/wp-json\/wp\/v2\/categories?post=621"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gncz.net\/index.php\/wp-json\/wp\/v2\/tags?post=621"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}