Page 1 of 1

PHP error that I can't get working!

Posted: Tue May 05, 2009 6:26 pm
by esmarts
OK I am getting the following error:

Notice: Uninitialized string offset: 16 in C:\wamp\www\decode\upload.php on line 144

I think it has something to do with my coding being outdated, but I still cant get it.

Here is the lines where the error is occurring:

Code: Select all

 
141- // decrypt chunk
142- $j = 0 ;
143- for ( $i = 0 ; $i < strlen ( $chunk ); $i ++) {
                    //This is where the error is!
144- $chunk [ $i ]= chr ( ord ( $chunk [ $i ]) ^ mt_rand ( 0 , 0xff ) ^ ord ( $chunk_md5 [ $j ]));
145- if ( $j < strlen ( $chunk_md5 )) {
146- $j ++;
147- }
else {
 
$j = 0 ;
}
}
 
echo "Dumping decrypted header: <b>header.dat</b><br>\n" ;
$f = fopen ( "header.dat" , "wb" );
fwrite ( $f , $chunk );
fclose ( $f );
?>
Is there any other way of writing this?

Re: PHP error that I can't get working!

Posted: Tue May 05, 2009 6:29 pm
by esmarts
LOL stupid me I have ^ in there!!!!


But for some reason I still can't get it to work? any suggestions