Changeset 139 for scrabutility/www


Ignore:
Timestamp:
04/13/08 13:45:40 (10 years ago)
Author:
csnyder
Message:

New vowel/consonant match

File:
1 edited

Legend:

Unmodified
Added
Removed
  • scrabutility/www/lookup.php

    r138 r139  
    99$grep = '/bin/grep'; 
    1010$dictionary = './'.$dict.'.txt'; 
    11 $word_limit = 2048; 
     11$word_limit = 4926; 
    1212 
    1313?> 
     
    5454    print "<p>".(count($words)-1)." words:</p>\n"; 
    5555    if ( count($words) < $word_limit ) { 
     56      print "<p>Arbitrary limit of {$word_limit} words exceeded, please narrow your search.<br>Here is a random sampling of the results.</p>"; 
     57      $blockstart = rand( 0, count($words)-200 ); 
     58      $words = array_slice( $words, $blockstart, 200 ); 
     59    } 
    5660    // loop through words 
    5761    foreach( $words AS $word ) { 
     
    7781      print "</div>\n"; 
    7882    } 
    79     } 
    80     else { 
    81       print "<p>Arbitrary limit of {$word_limit} words exceeded, please narrow your search.</p>"; 
    82     } 
    8383  } catch ( Exception $e ) { 
    8484    ?> 
Note: See TracChangeset for help on using the changeset viewer.