<commit_before><?php

require_once '../Splunk.php';
require_once 'settings.php';

$search = array_key_exists('search', $_GET) ? $_GET['search'] : '';

?><!DOCTYPE html>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>Search | Splunk PHP SDK Examples</title>
  <style>
    table { border-collapse: collapse; }
    table, th, td { border: 1px solid black; }
    th, td { padding: 5px; }
  </style>
</head>
<body>

<h2>Search</h2>
<form method="get" action="">
  <input type="text" name="search" placeholder=""
    value="<?php echo htmlspecialchars($search); ?>"/>
  <input type="submit" value="Search"/>
</form>

<?php if ($search !== ''): ?>
  <h2>Progress</h2>
  <ul>
    <?php
    try
    {
      // Login and start search job
      $service = new Splunk_Service($SplunkExamples_connectArguments);
      // (NOTE: Can throw HTTP 401 if bad credentials)<commit_msg>Extend width of search field to 100 characters.<commit_after><?php

require_once '../Splunk.php';
require_once 'settings.php';

$search = array_key_exists('search', $_GET) ? $_GET['search'] : '';

?><!DOCTYPE html>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>Search | Splunk PHP SDK Examples</title>
  <style>
    table { border-collapse: collapse; }
    table, th, td { border: 1px solid black; }
    th, td { padding: 5px; }
  </style>
</head>
<body>

<h2>Search</h2>
<form method="get" action="">
  <input type="text" name="search" placeholder="" size="100"
    value="<?php echo htmlspecialchars($search); ?>"/>
  <input type="submit" value="Search"/>
</form>

<?php if ($search !== ''): ?>
  <h2>Progress</h2>
  <ul>
    <?php
    try
    {
      // Login and start search job
      $service = new Splunk_Service($SplunkExamples_connectArguments);
      // (NOTE: Can throw HTTP 401 if bad credentials)
{'fraction_non_alphanumeric': 0.18746652383502946, 'fraction_numerical': 0.013926084627745045, 'mean_word_length': 3.9157894736842107, 'pattern_counts': {'":': 0, '<': 49, '<?xml version=': 0, '>': 47, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3470410', 'n_tokens_mistral': 662, 'n_tokens_neox': 627, 'n_words': 163}