Tag: php

  • PHP eval equivalent to include

    The PHP include statement includes and evaluates a specific file, not what if we want to modify that file first before including, i.e. a version template file. Well this can be done with PHP eval. I file is included as follows; Using eval, we can achieve the same as above as follows;

  • PHP code to automatically bid/buy an eBay auction item

    The following PHP code will automatically bid on an eBay item. modify the following variables; $username = “username”; //the eBay username $password = “password”; //the eBay password $item = 300712344201; //the item number $bid =  0.01; //the  bid value in the item’s currency

  • RegexBuddy – a solution to the Regular Expressions (Regex) nightmare

    For the last few months I have been using RegexBuddy, software designed to help with Regular Expressions. After using it to create and test more than one extremely complex regular expression, I thought it was time I gave RegexBuddy some ‘big ups’. So what is so good about RegexBuddy, Firstly, it allows you to create…

  • Convert from Google KML to GPS Exchange Format GPX with PHP

    Here is a quick post on converting from KML files used in Google Earth/Maps to GPX Exchange Format (GPX) with PHP. Code is quite explanatory, change $u with the location of the KML file, code will output GPX XML. Alternatively, download the code here. Let me know if you find any issues.

  • Convert Relative Links to Absolute Links with PHP Regex

    Here is a quick post on how to find and replace relative links with absolute links using PHP Regular Expressions (regex).

  • Online RSVP form and database with PHP, JavaScript and MySQL

    Requirements Recently, I needed an online RSVP system for a reception I was hosting, all the options out there didn’t meet my requirements; Customisable and able to self-host No need for tracking codes/numbers to be sent with invitation Able to RSVP additional guests Able to modify an existing RSVP Implementation As usual, I decided to…

  • Dynamic Google Maps circle markers/icons with PHP

    A while back I posted on how to create dynamic Google maps markers which allow for any colour and any text in the classic Google map style. Recently, I have had a need to do the same with circular markers. It uses the ‘Image Smooth Arc‘ function provided by Ulrich Mierendorff. Similarly, I provide a…

  • PHP Factorial and Combination functions

    A quick post on two functions for PHP that provide factorial and combination support.

  • RSS feed aggregator/combiner in PHP with Magpie RSS (v2)

    I have recently upgraded the code to combine multiple RSS feeds, for the original version see this post. To install, extract the following zip file to a directory where you want your combined feeds to be displayed, I use t.com/combinedfeed as xxxxx.com/feed is already used by WordPress. Edit index.php for your site, and make sure…

  • Google Map v1.4.7 – inline WordPress Google Maps

    I have released an updated version of Google Map which allows for coloured and variable text markers, see the example below. tgm(example.xml) Unfortunately, it now requires FreeType being compiled into PHP. If FreeType is not installed only the default marker and markers A-Z will be usable, with anything else being replaced with the default marker.…