Skip to content
This repository has been archived by the owner on Nov 3, 2022. It is now read-only.
/ api.php Public archive

PHP version of Iconify API. You can use it to serve Iconify icon sets from your own servers.

Notifications You must be signed in to change notification settings

iconify/api.php

Repository files navigation

Iconify API

This software is no longer maintained. Use Node.js version of API: https://github.com/iconify/api

PHP is no longer supported because:

  • It is much slower than Node version of API.
  • It has not been maintained for a while.
  • Updating it would require large effort, but it never be able to match Node version because of import and cleanup tools available in Node.

About

This code runs on api.iconify.design that is used to serve collections and SVG images.

Make sure your server matches requirements below:

  • You must have PHP 5.6 or newer version.
  • Server must be running Apache with mod_rewrite enabled and AllowOverride enabled.
  • Files must be writable by same user that runs PHP scripts to allow writing to "cache" and "git-repos" directories.
  • If you are using function to synchronize repositories, make sure Git is installed and is accessable from command line.

Node.js version is available at https://github.com/iconify/api.js

How to use it

Upload files in root directory of your website. Icons server requires its own domain or sub-domain.

Add custom configuration to config.php. Default configuration is available as reference in config-default.php. See config.md

Node vs PHP

Node.js version of server is faster because it loads everything only once on startup. It is a bit harder to setup though because you need to install additional software and make sure server is running (using tools such as "pm2").

PHP process ends when HTTP request ends, so PHP has to reload lots of things for each request. PHP version has caching to minimize loading times, but it is still nowhere near as fast as Node.js version. The only upside of PHP version is it is easy to setup - simply upload files and you are done.

About

PHP version of Iconify API. You can use it to serve Iconify icon sets from your own servers.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages