Skip to content
Permalink
Browse files

Added the ablity to search the contesting master scp database.

  • Loading branch information...
magicbug committed Aug 13, 2019
1 parent eafae06 commit 933ff9897929391dc80f05d48234d9c931342c24
Showing with 37,280 additions and 0 deletions.
  1. +35 −0 application/controllers/lookup.php
  2. +37,245 −0 updates/masterscp.txt
@@ -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
}
}
}
}

0 comments on commit 933ff98

Please sign in to comment.
You can’t perform that action at this time.