Category Archives: PHP

(PHP) PHP Miles to Latitude and Miles to Longitude Converter

There are tons of functions out there to calculate the distance between two points, but what if you know one point and want to calculate the latitude (“vertical”) or longitude (“horizontal”) equivalent of a fixed distance, in miles? An example application would be in generating a minimum & maximum latitude and longitude bounding box around [...]

Posted in PHP | Tagged , , , , | Leave a comment

(PHP) Fibonacci series (several different algorithms)

Planning to add proper PHPunit and PHPlogger code examples and blog about it at http://bcmoney-mobiletv.com/blog/

Posted in PHP | Tagged , , , , , , , | Leave a comment

(PHP) auto complete like google suggestion

auto complete code snippet like google suggestions

Also posted in JavaScript | Tagged , , , , , , , | Leave a comment

(PHP) Resize an image without distorting proportions

A function that resizes an image to desired width and height, but does not distort the image proportions. Suggestions please comment.

Posted in PHP | Tagged , , , , , , , | Leave a comment

(PHP) Get all information from a YouTube video

This code snippet gets all information from a YouTube video (title, description, duration, thumbnail url, thumbnail width, thumbnail height, etc..) using the video id and YouTube API. (Sorry about my bad english)

Posted in PHP | Tagged , , , , , , , , , , , , , | 4 Comments

(PHP) get Latitude/Longitude from an address

Convert an address to geocode Latitude/Longitude positioning with PHP and Google Maps

Posted in PHP | Tagged , , , , , , , , , , | Leave a comment

Test for a valid e-mail address and MX records in PHP

Tests for a valid email address and optionally tests for valid MX records, too.

Posted in PHP | Tagged , , , , , , , , , | Leave a comment

(PHP) Magento Using Collections, Filters and Manipulation Methods

A collection is a Model type containing other Models, it is basically used in Magento to handle product lists (ie. from a category or a bundle option), but not only. This is a simple example of loading some product collection from a category and ordering them on their product name using Magento’s API.

Posted in PHP | Tagged , , , , , , , , | Leave a comment

(PHP) Magento Create Admin (Backend) Module with Grids

If you are creating an admin module for Magento (learn creating admin module in Magento) then you would surely be asked to create grids (eg. for order listing). Creating grids can be somewhat difficult for the novice Magento programmers, but in this tutorial we will create a grid in the admin module in the simplest [...]

Posted in PHP | Tagged , , , , , | Leave a comment