/** * Longitude-Latitude utilities * * This function will include the static functions (collection of methods) * that are going to be used to help with the longitude and latitude coords. * * @version 0.1.0 * @license LGPL-CC * @copyright 1line * */ class Util_LongLat { // {{{ public static function getCoord /** * Get Coords * * This function retrieves the coords of a givent url. * * @param string $type The type, either longitude or latitude * @param string $content The content of the page to parse. * @return string The value of the parsed content. */ public static function getCoord($type = 'latitude', $content) { switch (strtolower($type)) { case 'longitude': case 'latitude': $type = (string)$type; } preg_match("/
(.*[^>])<\/dd>/", $content, $values, PREG_OFFSET_CAPTURE);