Posts Tagged ‘php

There frequently arises a need to return mySQL query results in xml. Maybe you need to send the xml data to the browser or you want to use it as a xml request to a web service; whatever the application, the following function will return the result of a sql query in xml format. The [...]

The Luhn algorithm also known as the “modulus 10″ or “mod 10″ algorithm, is a checksum formula which can be used to validate credit card numbers. Developed in the 1950′s by IBM scientist Hans Peter Luhn and described in U.S. Patent 2,950,048. A PHP implementation is shown below.   function LuhnCheck($strDigits) { $sum = 0; [...]

PHP is a wonderful dynamic language, and the addition of Unicode support, namespaces in the upcoming version 6 will make it even better. If you are new to PHP or are thinking of moving to PHP form other language then the following list of books will provide you with the required knowledge to become a [...]

There is a frequent need to post xml data to a url. Below is shown an example which lets you post xml data using CURL.