Skip to content

RickSeymour/Police.uk-API-PHP-Curl-Class

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
Matthew Gribben

Starting to redesign the PoliceUK class. Removed the requirment for auth data as no longer needed by Police.UK

Full API documentation available from http://policeapi2.rkh.co.uk/api/docs/


Simply require the police.php and instantiate the PoliceUK class.

For use in Zend, create a library folder for the code calld Policeuk and rename the class Policeuk_Police.

 
Returns FALSE or a json decoded associative array


require_once('police.php');

$POLICE = new PoliceUK();

$r=$POLICE->lastupdated();
$r=$POLICE->forces();
$r=$POLICE->force('cumbria');
$r=$POLICE->neighbourhoods('cumbria');
$r=$POLICE->neighbourhood('cumbria','GARZ15');
$r=$POLICE->neighbourhood_events('cumbria','GARZ15');
$r=$POLICE->neighbourhood_team('cumbria','GARZ15');
$r=$POLICE->neighbourhood_locate(53.771962,-2.721605);
$r=$POLICE->crime_categories();
$r=$POLICE->crime_locate(53.771962,-2.721605);
$r=$POLICE->crime_neighbourhood('cumbria','GARZ15');




cli.php
(SheBang Included)

./cli.php METHOD PARAMS

eg.
./cli.php neighbourhoods cumbria
./cli.php crime_locate 53.771962 -2.721605

About

PHP Class to access the Police.uk API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages