init_user_agent.php 258 Bytes EditWeb IDE 1 2 3 4 5 6 7 8 9 10 11 12 13 <?php require(__DIR__ . '/../vendor/autoload.php'); $jsonfile = __DIR__ . '/../Tests/user_agents.json'; $uas = json_decode(file_get_contents($jsonfile), true); foreach( $uas as $key => &$val ) { $val = parse_user_agent($key); } echo json_encode($uas);