|
-
June 18th, 2009, 12:21 AM
#1
[RESOLVED] PHP Cant seem to find my error... Need another set of eyes
I am creating this include PHP that in theory should allow someone to turn text into a long series of images
I keep getting the timeout error...
The script must be flawed...
Anhow here is the code it is indicating (The indication changes each time)
PHP Code:
<?php // OMGNoTXT -- A method of converting text to a series of images // As with all my scripts Open Source // By: Alexander Leonn Santiago
$img[1] = "<img src='WebIMGs\b.GIF'>"; // Put your first image here $img[2] = "<img src='WebIMGs\g.GIF'>"; // Put your second image here $b = "<img src='WebIMGs\blank.GIF'>"; // Put your blankimage here $img[0] = 1; // Indicates wither $img[1] or $img[2] should be used
function imgc() { // Just change the images if($img[0] == 2) $img[0] = 1; else $img[0] = 2; }
function line1($char) { // Create the <img> code if($char == "A"){ return "{$b}{$img[$img[0]]}{$img[$img[0]]}{$b}{$b}";} // XOOX else if($char == "B"){ return "{$img[$img[0]]}{$img[$img[0]]}{$img[$img[0]]}{$b}{$b}";} // OOOX //... } //... function TXT($a) { // The main function the this include... Used to convert text to a series of images... Useful for custom capthas and hiding text from search engines $count = strlen($a); // How many chars did you send to the script $a = strtoupper($a); // Lets make this easy so I dont have to do lowercase for($l = 0; $l < $count; ++$l) { // As long as there are still letters $l1 += line1(substr($a,$l,1)); // Create the top of imgtxt $l2 += line2(substr($a,$l,1)); // Create the middle top of imgtxt $l3 += line3(substr($a,$l,1)); // Create the middle of imgtxt $l4 += line4(substr($a,$l,1)); // Create the middle bottom of imgtxt $l5 += line5(substr($a,$l,1)); // Create the bottom of imgtxt imgc(); // Change colors or images as it were } return $l1 . "<br>" . $l2 . "<br>" . $l3 . "<br>" . $l4 . "<br>" . $l5; // Combine the lines to actually make the images look like text } ?>
I tried to cut out the fat...
The //... indicate spots I cut out
If you can see my error...
I would be most grateful
Alex
EDIT: Most foolish I was...
Anyhow when reviewing my post I noticed my error...
on my for loop I had $l1 instead of $l
Humble apology's to anyone who read my post
Last edited by PeejAvery; June 18th, 2009 at 09:10 AM.
Reason: Corrected the code...$l1 to $l
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|