Det er en forudsætning at composer er installeret: Composer til dine php projekter Installer browscap-php
1 |
# php /usr/bin/composer require browscap/browscap-php |
Dernæst skal browscap data hentes og placeres (du kan bruge samme kommando til fremtidige opdateringer). Her et eksempel:
1 2 3 4 5 6 7 8 |
# vendor/bin/browscap-php browscap:update --cache ../../data/browscap_cache [2018-05-04 12:26:47] started updating cache with remote file {"memory_peak_usage":"2 MB"} [2018-05-04 12:26:48] a newer version is available, local version: 6027, remote version: 6000028 {"memory_peak_usage":"4 MB"} [2018-05-04 12:26:48] start creating patterns from the ini data {"memory_peak_usage":"17.44 MB"} [2018-05-04 12:26:50] finished creating patterns from the ini data {"memory_peak_usage":"37.43 MB"} [2018-05-04 12:26:50] start creating data from the ini data {"memory_peak_usage":"37.43 MB"} [2018-05-04 12:26:51] finished creating data from the ini data {"memory_peak_usage":"65.44 MB"} [2018-05-04 12:26:51] finished updating cache with remote file {"memory_peak_usage":"65.44 MB"} |
Se yderlige info her: Github: browscap/browscap-php