saving ContentEditable HTML using PHP simple example 7

saving ContentEditable HTML using PHP simple example
HTML supports (in most browsers) the contentEditable attribute which allows you to dynamically change a web page(s) content by simply editing the page, think of it like a WYSIWYG editor , but built-in to the browser. The purpose of this post is to show you how you can use this to create a simple, but ...

web page hot reload in plain JavaScript + Apache & PHP 4

web page hot reload in plain JavaScript + Apache & PHP
Hot re-loading, that is automatically updating the web page, when its content changes on the server, into the browser is a convenient developer aid for modern tooling like, webpack, AngularJS, ReactJS, VueJS etc.  I created   super simple  way  by just adding one JavaScript include at the bottom of your file and it works with a ...

Javascript Server Sent Events SSE easy tutorial demo of (EventSource) 4

Javascript Server  Sent Events SSE easy tutorial demo of (EventSource)
This  easy to follow tutorial will show you how to stream server data  (sometimes called SSE’s, Server Sent Events) , in real-time to your browser. Using  Javascript’s EventSource API  interface we can seamlessly update and display on a web page real-time  server-sent data  all without the complexities of setting up a web socket server. Why ...

Log events via PHP to database with Windows or Linux command line

Log events via PHP to database with Windows or  Linux command line
Here’s a neat example (for Linux and Windows systems) of how to easily capture (log) and store the result of some script or program or really anything, in a central database table. Sure you could use just a log file, but spinning up an instance of MySQL (or SQLite) is trivial, and in the long ...

PHP on Linux authenticate users with a Windows Server Active Directory 11

PHP on Linux authenticate users with a Windows Server Active Directory
A common request when building INTRANET web applications is to have users use only one  common shared set of  login credentials. Typically in most small and medium businesses this means that logging into a Windows Server of some kind to access the network.  Windows Servers use Active Directory (AD) ,which is  basically Microsoft’s glorified LDAP ...

code for MySql / MariaDB to trigger / signal external script from database 4

code for MySql / MariaDB to trigger / signal external script from database
One feature I often wish MySQL / MariaDB (I’ll refer from now to just MariaDB referring to both) had was the ability to trigger or launch an  external script or open a socket connection to some external site; on a database event. Perhaps using a stored procedure in other words generate a signal /event to ...

PHP 7 is here! 1

PHP 7 is here!
It looks like the latest edition of PHP has been released, PHP 7 , and it  brings a lot of new enhancements. Its biggest new capabilities are vast speed improvements, rumor has it that its on par with Facebook’s proprietary HHVM project (PHP JIT compiler). There’s a nice write up here over at Kinsta.com of PHP ...

genetic algorithms in PHP code example of (evolutionary programming ) 20

genetic algorithms  in PHP code example of (evolutionary programming )
This posting and php code sample is about fascinating topic of  Genetic Algorithms (GA) which simulate evolution using computer code to help find  near-optimal solutions when dealing with problems that  involve multiple disparate requirements. I recently began playing with Genetic algorithms (Genetic algorithms  GA, for short) which  are  part of a class of evolutionary algorithms (EA) that make up ...

Bootstrap Bootgrid with PHP json server side script 37

Bootstrap Bootgrid with PHP json server side script
I recently came across Jquery Bootgrid, which is Twitter Bootstrap (aka bootstrap)  friendly table grid, that is very similar in function to Datatables.While not as feature rich as datatables (yet), it provides a very tiny 4Kb (minified and gzipped) footprint and allows you to leverage all the typography and layout control elements that are present in bootstrap. ...