Hackerboard Wiki HaboBlog
Hackerboard bei Facebook Hackerboard bei Google+ Hackerboard bei Twitter

[HaBo]

 
(Web-) Design und webbasierte Sprachen Tipps & Tricks, Designabgleich, HTML & Javascript, Flash, ASP, PHP, Perl/CGI...

PHP-Motion Captcha Problem

Diskussion: PHP-Motion Captcha Problem im Forum (Web-) Design und webbasierte Sprachen, in der Kategorie Web, Network & Multimedia Palace; Anzeige Hallo, ich habe ein mehr oder weniger großes Problem mit dem Video Host Script von phpmotion habe es HIER ...

Antwort
Alt 13.12.08, 14:26   #1 (permalink)
 
Registriert seit: 22.11.07
sonywalker Leistung: Facit NTK
Likes: 0
Standard PHP-Motion Captcha Problem

Anzeige

Hallo,

ich habe ein mehr oder weniger großes Problem mit dem Video Host Script von phpmotion

habe es HIERzu testzwecken installiert, leider wird der Captcha bei der Anmeldung nicht angezeigt, wodurch ich mich nun nicht Anmelden kann,

Könnt ihr mir bei der Lösung des Problems helfen, da mir dort im Forum nicht geholfen werden konnte,

Hier mal die image.php (dort wird der Captcha generiert)

PHP-Code:
<?
/*
 * Captcha
 *
 * Created on February 3, 2007
 * Developer: Maria Erlandson
 * http://www.teasso.com
 *
 */
session_start();

//Set these avriables as you see fit
$fontsize 18;
$numcharacters 6;
$bgcolor "3968c7";
$textcolor "FFFFFF";
$num_interference_lines 0;

//At least one of these MUST be true
$str_includes_numbers true;
$str_includes_uppercase true;
$str_includes_lowercase true;

//Generate Captcha String
$_SESSION['teassocaptcha'] = RandString($numcharacters$str_includes_numbers$str_includes_uppercase$str_includes_lowercase);

//Send a generated image to the browser
create_image($numcharacters$fontsize$bgcolor$textcolor$num_interference_lines);
exit();

function 
create_image($length$fontsize$bgcolor$textcolor$numlines)
{

    
//Set the image width and height
    
$trifont 1.5 $fontsize;
    
$width = ($trifont $length);
    
$height $fontsize;

    
//Create the image resource
    
$image imagecreate($width$height);

    
//We are making colors
    
$forecolor imagecolorallocate($imagehexdec(substr($textcolor,0,2)), hexdec(substr($textcolor,2,2)), hexdec(substr($textcolor,4,2)));
    
$backcolor imagecolorallocate($imagehexdec(substr($bgcolor,0,2)), hexdec(substr($bgcolor,2,2)), hexdec(substr($bgcolor,4,2)));

    
//Make the background backcolor
    
imagefill($image00$backcolor);

    
//Add randomly generated string in forecolor to the image
    //imagestring($image, 7, 30, 3, $pass, $forecolor);

    //Tell the browser what kind of file is come in
    
header("Content-Type: image/jpeg");

    
//imageloadfont("Alpha Romanie G98.ttf");

    
for($i 0$i $length$i++) {
        
$source imagecreate($trifont$trifont);

        
//We are making colors
        
$forecolors imagecolorallocate($sourcehexdec(substr($textcolor,0,2)), hexdec(substr($textcolor,2,2)), hexdec(substr($textcolor,4,2)));
        
$backcolors imagecolorallocate($sourcehexdec(substr($bgcolor,0,2)), hexdec(substr($bgcolor,2,2)), hexdec(substr($bgcolor,4,2)));

        
imagefill($source00$backcolors);

        
// changed 04-28-08 to test for proper gd lib ttf function

        
if (function_exists('imagettftext')) {

        
imagettftext($source$fontsize0018$forecolors"Alpha Romanie G98.ttf"substr($_SESSION['teassocaptcha'], $i1));
        } else {
        
imagestring($source530substr($_SESSION['teassocaptcha'], $i1), $forecolors);
        }

        
//imagettftext($source, $fontsize, 0, 0, 18, $forecolors, "Alpha Romanie G98.ttf", substr($_SESSION['teassocaptcha'], $i, 1));

        //Rotate Somehow
        
switch(mt_rand(1,8)) {
            case 
1:
                
$source imagerotate($source, -20$backcolors);
                break;
            case 
2:
                
$source imagerotate($source20$backcolors);
                break;
            case 
3:
                
$source imagerotate($source, -15$backcolors);
                break;
            case 
4:
                
$source imagerotate($source15$backcolors);
                break;
            case 
5:
                
$source imagerotate($source, -10$backcolors);
                break;
            case 
6:
                
$source imagerotate($source10$backcolors);
                break;
            case 
7:
                
$source imagerotate($source, -2$backcolors);
                break;
            case 
8:
                
$source imagerotate($source2$backcolors);
                break;
        }
        
//Set Location variables
        
$loc_x 5+($trifont*$i);
        
$loc_y $trifont/mt_rand((-$fontsize/10),($fontsize/10));
        
//Set Size Variables
        
$size_x $trifont * (mt_rand(100110) / 100);
        
$size_y $trifont * (mt_rand(100110) / 100);

        
imagecopymerge($image,$source,$loc_x,$loc_y,0,0,$size_x,$size_y,90);

        
imagedestroy($source);
    }

    
/*Throw in some lines to make it a little bit harder for any bots to break */
    
imagesetstyle($image, array($forecolor$forecolor$forecolor$forecolor$forecolor$forecolor$forecolor$forecolorIMG_COLOR_TRANSPARENTIMG_COLOR_TRANSPARENTIMG_COLOR_TRANSPARENTIMG_COLOR_TRANSPARENTIMG_COLOR_TRANSPARENTIMG_COLOR_TRANSPARENTIMG_COLOR_TRANSPARENTIMG_COLOR_TRANSPARENT));
    
imagerectangle($image,0,0,$width-1,$height-1,$forecolor);
    
//for($i = 1; $i < mt_rand(1,5); $i++) {
    
for($i 1$i < ($numlines); $i++) {
        
$from_x mt_rand(0$width);
        
$from_y mt_rand(0$height);
        
$to_x mt_rand(0$width);
        
$to_y mt_rand(0$height);
        
imageline($image$from_x$from_y$to_x$to_yIMG_COLOR_STYLED);
    }

    
//Output the newly created image in jpeg format
    
imagejpeg($image);

    
//Free up resources
    
imagedestroy($image);
}

function 
RandString($len$num$uc$lc) {
    if (!
$len || $len<|| $len>100) {
        print 
"Error: \"Length\" out of range (1-100)<br>\n";
        return;
    }
    if (!
$num && !$uc && !$lc) {
        print 
"Error: No character types specified<br>\n";
        return;
    }

    
$s="";
    
$i=0;
    do {
        switch(
mt_rand(1,3)) {
            
// get number - ASCII characters (0:48 through 9:57)
            
case 1:
                if (
$num==1) {
                    
$s .= chr(mt_rand(48,57));
                    
$i++;
                }
                break;

            
// get uppercase letter - ASCII characters (a:65 through z:90)
            
case 2:
                if (
$uc==1) {
                    
$s .= chr(mt_rand(65,90));
                    
$i++;
                }
                break;

            
// get lowercase letter - ASCII characters (A:97 through Z:122)
            
case 3:
                if (
$lc==1) {
                    
$s .= chr(mt_rand(97,122));
                    
$i++;
                }
                break;
        }
    } while (
$i<$len);

    return 
$s;
}
?>
Der Captcha wird durch den Schrift FONT
Alpha Romanie G98 erstellt

die GD Library ist Installiert etc

Danke im Vorraus
sonywalker ist offline   Mit Zitat antworten
Alt 14.12.08, 21:00   #2 (permalink)
Senior Member
 
Benutzerbild von Chakky
 
Registriert seit: 28.10.03
Chakky Leistung: 8086
Chakky eine Nachricht über ICQ schicken
Likes: 110
Standard

leserechte auf die font datei?

was sagt php_error(E_ALL);?
__________________
cu
Chakky

we are dreaming in digital
we are living in realtime
we are thinking in binary
we are talking in IP
welcome to our world
Chakky ist offline   Mit Zitat antworten
   
HaBOT
 
- Anzeige -

Werbung ist gerade online    
Alt 15.12.08, 08:55   #3 (permalink)
 
Benutzerbild von rami
 
Registriert seit: 09.02.08
rami Leistung: Facit NTK
rami eine Nachricht über ICQ schicken rami eine Nachricht über Skype™ schicken
Likes: 0
Standard

Zitat:
Original von Chakky
leserechte auf die font datei?

was sagt php_error(E_ALL);?
error_reporting(E_ALL); meinst du wohl
__________________
rami ist offline   Mit Zitat antworten
Alt 15.12.08, 15:28   #4 (permalink)
Themenstarter
 
Registriert seit: 22.11.07
sonywalker Leistung: Facit NTK
Likes: 0
Standard So

... das Captcha Problem hat sich erstmal erledigt, hab sie einfach rausgenommen
Kennt sich jemand mit phpmotion aus? da die Hochgeladenen Videos nicht Konvertiert werden -.-

bzw sie landen auch nicht im Videohost ordner, sondern im html Ordner also eine eben zurück

Kennt sich jemand damit aus?

Greetz,

EDIT1
Zitat:
bzw sie landen auch nicht im Videohost ordner, sondern im html Ordner also eine eben zurück
Konnte gefixxt werden, lag an einem Fehlerhaften Eintrag im cgi script
sonywalker ist offline   Mit Zitat antworten
Alt 15.12.08, 21:02   #5 (permalink)
Senior Member
 
Benutzerbild von Chakky
 
Registriert seit: 28.10.03
Chakky Leistung: 8086
Chakky eine Nachricht über ICQ schicken
Likes: 110
Standard

ja naklar mein ich das oops ^^

musste man nich für die flashvideos ein "plugin" unter php mit compilen? *hatte da doch sowas in der richtung mal gelesen*
__________________
cu
Chakky

we are dreaming in digital
we are living in realtime
we are thinking in binary
we are talking in IP
welcome to our world
Chakky ist offline   Mit Zitat antworten
Antwort
   
- Anzeige -

Werbung ist gerade online    

[HaBo] » Web, Network & Multimedia Palace » (Web-) Design und webbasierte Sprachen » PHP-Motion Captcha Problem
Themen-Optionen
Ansicht

Forumregeln
Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks sind aus
Pingbacks sind aus
Refbacks sind aus


Ähnliche Themen
Thema Autor Forum Antworten Letzter Beitrag
Stop Motion Film L33D Music- & Filmbox 0 27.10.09 12:05
[CAPTCHA] Pixel von minimierten Fenster bekommen? PHRoZeNCReW Code Kitchen 9 04.04.09 15:27
Spiele in Slow Motion / CPU Drosselung ?! Knorpel Die Problemzone 2 16.04.08 23:31
reCAPCHTA > Captcha mit nettem Nebeneffekt odigo Webmaster-Security 8 26.09.07 17:20
network cam motion aufzeichnen? onix Downloads 0 13.10.05 10:22


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61