Download the PHP package xlvis7/geonames without Composer

On this page you can find all versions of the php package xlvis7/geonames. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package geonames

geonames v2.x

Latest Stable Version Total Downloads License GitHub issues GitHub forks GitHub stars Travis (.org)

A Laravel (php) package to interface with the geo-location services at geonames.org.

Notes

Forked by xlvis7 to support Laravel7

There is still a lot that needs to be done to make this package "complete". I've gotten it to a point where I can use it for my next project. As time allows, I will improve the documentation and testing that comes with this package. Thanks for understanding.

Installation

And then add geonames provider to providers array in app.php config file:

After that, Run migrate command:

Want to install all of the geonames records for the US, Canada, and Mexico as well as pull in the feature codes definitions file in English?

Want to just install everything in the geonames database?

Maintenance

Now that you have the geonames database up and running on your system, you need to keep it up-to-date.

I have an update script that you need to schedule in Laravel to run every day.

Some info on how to schedule Laravel artisan commands:

https://laravel.com/docs/5.6/scheduling#scheduling-artisan-commands

You can read this notice at: http://download.geonames.org/export/dump/

The "last modified" timestamp is in Central European Time.

It looks like geonames updates their data around 3AM CET.

So if you schedule your system to run the geonames:update artisan command after 4AM CET, you should be good to go.

I like to keep my servers running on GMT. Keeps things consistent.

(Central European Time is 1 hour ahead of Greenwich Mean Time)

Assuming your servers are running on GMT, your update command would look like:

The update artisan command will handle the updates and deletes to the geonames table.

Gotchas

Are you getting something like: 1071 Specified key was too long

@see https://laravel-news.com/laravel-5-4-key-too-long-error

Add this to your AppServiceProvider.php file:

A quick word on indexes

This library contains a bunch of migrations that contain a bunch of indexes. Now not everyone will need all of the indexes.

So when you install this library, run the migrations and delete the indexes that you don't need.

Also, Laravel doesn't let you specify a key length for indexes on varchar columns. There are two indexes suffering from this limit. Instead of creating indexes on those columns the "Laravel way", I send a raw/manual query to create the indexes with the proper lengths.


All versions of geonames with dependencies

PHP Build Version
Package Version
Requires php Version ^7.3
ext-intl Version *
ext-pdo Version *
ext-curl Version *
laravel/framework Version ^7.0
michaeldrennen/remote-file Version ^2.0
michaeldrennen/local-file Version ^2.0
curl/curl Version ^2.2
fabpot/goutte Version ^4.0
nesbot/carbon Version ^2.28
illuminate/routing Version ^7.0
illuminate/support Version ^7.0
illuminate/database Version ^7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package xlvis7/geonames contains the following files

Loading the files please wait ....