Added the ablity to search the contesting master scp database.

pull/425/head
Peter Goodhall 2019-08-13 21:22:06 +01:00
rodzic eafae062e5
commit 933ff98979
2 zmienionych plików z 37280 dodań i 0 usunięć

Wyświetl plik

@ -0,0 +1,35 @@
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/*
Data lookup functions used within Cloudlog
*/
class Lookup extends CI_Controller {
public function index()
{
}
public function scp($string) {
$file = 'updates/masterscp.txt';
$lines = file($file, FILE_IGNORE_NEW_LINES);
$input = preg_quote($string, '~');
$result = preg_grep('~' . $input . '~', $lines, 0);
$copy = $result;
foreach ($result as &$value) {
echo $value;
if (next($copy )) {
echo ', '; // Add comma for all elements instead of last
}
}
}
}

37245
updates/masterscp.txt 100644

Plik diff jest za duży Load Diff