summaryrefslogtreecommitdiff
path: root/freecap
diff options
context:
space:
mode:
authorlsces <lester@lsces.co.uk>2025-08-29 13:20:53 +0100
committerlsces <lester@lsces.co.uk>2025-08-29 13:20:53 +0100
commit74f9d1ec51bad4f0a86ea51dd51c9ebcc48383d0 (patch)
treecdfd1d088360014326de39c07ffff7bf8d7a922a /freecap
parentd388cface6a2f2bc7368fa21d8cb6be2e7179f27 (diff)
downloadusers-74f9d1ec51bad4f0a86ea51dd51c9ebcc48383d0.tar.gz
users-74f9d1ec51bad4f0a86ea51dd51c9ebcc48383d0.tar.bz2
users-74f9d1ec51bad4f0a86ea51dd51c9ebcc48383d0.zip
Auth bits updated to PHP8.4 and namespace, but only bituser auth working
Diffstat (limited to 'freecap')
-rwxr-xr-x[-rw-r--r--]freecap/freecap.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/freecap/freecap.php b/freecap/freecap.php
index 0c66552..2d99aa8 100644..100755
--- a/freecap/freecap.php
+++ b/freecap/freecap.php
@@ -175,7 +175,7 @@ for($i=0 ; $i<sizeof($font_locations) ; $i++)
$handle = fopen($font_locations[$i],"r");
// read header of GD font, up to char width
$c_wid = fread($handle,12);
- $font_widths[$i] = ord($c_wid{8})+ord($c_wid{9})+ord($c_wid{10})+ord($c_wid{11});
+ $font_widths[$i] = ord($c_wid[8])+ord($c_wid[9])+ord($c_wid[10])+ord($c_wid[11]);
fclose($handle);
}
@@ -351,9 +351,9 @@ if($use_dict==1)
// don't allow to start with 'vowel'
if($rand_func(0,4)>=2 && $i!=0)
{
- $word .= $vowels{$rand_func(0,strlen($vowels)-1)};
+ $word .= $vowels[$rand_func(0,strlen($vowels)-1)];
} else {
- $word .= $consonants{$rand_func(0,strlen($consonants)-1)};
+ $word .= $consonants[$rand_func(0,strlen($consonants)-1)];
}
}
}
@@ -594,7 +594,7 @@ for($i=0 ; $i<strlen($word) ; $i++)
$j = $rand_func(0,sizeof($font_locations)-1);
$font = ImageLoadFont($font_locations[$j]);
- ImageString($im2, $font, $word_start_x+($font_widths[$j]*$i), $word_start_y, $word{$i}, $text_colour2);
+ ImageString($im2, $font, $word_start_x+($font_widths[$j]*$i), $word_start_y, $word[$i], $text_colour2);
}
// use last pixelwidth
$font_pixelwidth = $font_widths[$j];