PHPackages                             jessicadigital/tflcycles - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. jessicadigital/tflcycles

ActiveLibrary[HTTP &amp; Networking](/categories/http)

jessicadigital/tflcycles
========================

A module to fetch Santander Cycle availability within a distance of specified locations.

v1.0.0(10y ago)081PHP

Since Mar 31Pushed 10y ago1 watchersCompare

[ Source](https://github.com/jessicadigital/tflcycles)[ Packagist](https://packagist.org/packages/jessicadigital/tflcycles)[ RSS](/packages/jessicadigital-tflcycles/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

jessicadigital/tflcycles
========================

[](#jessicadigitaltflcycles)

A module to fetch Santander Cycle hire locations within a distance of specified locations. [Read more on the blog.](http://jessica.digital/tfl-cycle-points-php-package/)

Installation
============

[](#installation)

To include this package in your project, use composer:

`composer install jessicadigital/tflcycles`

Fetching hire locations
=======================

[](#fetching-hire-locations)

To fetch locations, first create a new instance of the TflCycles class:

`$tflcycles = new \JessicaDigital\TflCycles\TflCycles(); `

Now, specify your location(s) to find nearby hire stations:

`$tflcycles->addLocation($latitude, $longitude); `

You must specify one or more locations.

Next, set the search distance (in metres), e.g.

`$tflcycles->setDistance(2000); `

for 2km. This will find all bike hire locations within 2km of *any* of the specified locations. The default is 1000m.

Now, perform a search. Use the `find()` method to return an array of stations, or `save($filename)` to save this array directly to a file.

Example
=======

[](#example)

This example will fetch all cycle hire stations within 500m of Euston and Waterloo rail stations and save to a file called `cycles.json`:

```
// Create object
$tflcycles = new \JessicaDigital\TflCycles\TflCycles();

// Add location - Euston Station
$tflcycles->addLocation(51.5290371, -0.1368696);

// Add location - Waterloo Station
$tflcycles->addLocation(51.5031686, -0.1144991);

// Change distance to 500m
$tflcycles->setDistance(500);

// Save the found locations to a file called cycles.json
$tflcycles->save('cycles.json');

```

Usage
=====

[](#usage)

This package uses the [TfL Santander Cycle API](https://api.tfl.gov.uk/). Please abide by their Terms and Conditions.

Do not make repeated requests to the API - the data is only updated every five minutes. The recommended approach for using this package is to set up a scheduled CRON job to fetch and cache the data you need.

This project has no connection with TfL or the bike hire scheme; it was created as part of a development project and released for the community to enjoy.

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3739d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/17479344?v=4)[Dr Jessica Muirhead](/maintainers/jessicadigital)[@jessicadigital](https://github.com/jessicadigital)

---

Top Contributors

[![jessicadigital](https://avatars.githubusercontent.com/u/17479344?v=4)](https://github.com/jessicadigital "jessicadigital (4 commits)")

### Embed Badge

![Health badge](/badges/jessicadigital-tflcycles/health.svg)

```
[![Health](https://phpackages.com/badges/jessicadigital-tflcycles/health.svg)](https://phpackages.com/packages/jessicadigital-tflcycles)
```

###  Alternatives

[php-http/cache-plugin

PSR-6 Cache plugin for HTTPlug

25025.5M80](/packages/php-http-cache-plugin)[illuminate/http

The Illuminate Http package.

11937.2M6.5k](/packages/illuminate-http)[rdkafka/rdkafka

A PHP extension for Kafka

2.2k20.0k1](/packages/rdkafka-rdkafka)[httpsoft/http-message

Strict and fast implementation of PSR-7 and PSR-17

87930.4k113](/packages/httpsoft-http-message)[mezzio/mezzio-router

Router subcomponent for Mezzio

265.3M84](/packages/mezzio-mezzio-router)[serpapi/google-search-results-php

Get Google, Bing, Baidu, Ebay, Yahoo, Yandex, Home depot, Naver, Apple, Duckduckgo, Youtube search results via SerpApi.com

69122.6k](/packages/serpapi-google-search-results-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
