Posts

Showing posts with the label PHP

GPCL for PHP v. 2.3 commited to GitHub

Today I commit a new version - GPCL for PHP 2.3 - to GitHub. This is not a release, but master brunch for 2.3 stable. You can download sources from here .

Installing and using a free GeoIP database

Today's article is about install and update GeoIP database on Debian-like systems, integrate it with PHP and Apache. To install GeoIP on Debian 8 or Ubuntu 16.04 simple run this command: apt-get install geoip-database geoip-database-extra Now you have a GeoIP installed. But databases are obsolete. To update GeoIP databases, find data files on your system: dpkg -L geoip-database | grep GeoIP.dat You get a path like /usr/share/GeoIP/ Go to that directory and download updates: wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz Unpack files with replace old: gzip -df *.gz Rename GeoLiteCity.dat to GeoIPCity.dat: mv -f GeoLiteCity.dat GeoIPCity.dat You can put all these commands into one bash file (e.g. geoipupd.sh ) to run as single command: #!/bin/bash cd /usr/share/GeoIP/ wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz wget ...

What is GPCL?

GPCL is an object-oriented library for PHP, developed by me and used last ears. Today I write an introduction about GPCL . In few words, with GPCL you can write: include("documents.php"); class MyDoc extends TDocument { function __construct($title) { parent::__construct($title); $this->body->AddHeading(1)->content = "Hello, World!"; } } $doc = new MyDoc("Welcome!"); $doc->PrintAll(); On output you get well-formatted HTML document with "Hello, World" heading and "Welcome" Title.

SNK GSCP 1.6 Released

... and GPCL 2.0 announced. Yesterday a new version of PHP library - GSCP 1.6 released on SNK Software website. New features: TIMGH improved: now a multipass image processing is possible TCaptcha improved Imroved DB support in TVBTopicsH and TNewsH DB controls code revised On fetch results from DB Query result pointer no longer required TStdLoginForm improved, added captcha support const.php splitted to const.php itself and cconst.php Internalisation improved TDBListControl added Lists now support link property (if optional 3rd param in AddItem is URL) Added customValueFld property to DB lists AddLink improved, added ssymbols parametr to AddAttr method in TAttributes Bugfixes, etc. New version available for download from here and here . Also, upcoming 2.0 version is introduced. Possible, it is renamed to "GPCL-PHP" - General Purpose Class Library for PHP.

SNK GSCP 1.5 released!

An official release of SNK GSCP version 1.5 comes out yesterday , SNK Software website says . In this version fixed an issue with PHP versions prior to 5.2.1. SNK GSCP is an object-oriented PHP 5 framework written in Delphi-like syntax. It contain classes what represents a XHTML documents, or forms, or any elements. You can manipulate these elements as objects in runtime. This library provides classes with interfaces for work with images, like smart resize, merge or easy generate captcha. Also included tools for easy send email (in HTML format, with attachments, etc.) by any way, by using sendmail or via SMTP, and more. More details about GSCP you can find on this project page: http://www.snkey.net/projects/php/snk-gscp-en.html