Protecting email with string to image

Please help me to check what problem

generate.php

<?php header("Content-type: image/jpeg"); mysqli_connect('localhost','root','',''); mysqli_select_db('a_database'); if (isset($_GET['id'])){ $id = $_GET['id']; $query = mysqli_query( "SELECT `email` FROM `users` WHERE `id`= '".mysqli_real_escape_string($id )."' "); if(mysqli_num_rows($query)>=1) { $email = mysql_result($query,0,'email'); }else { $email = 'ID not found'; } }else{ $email = 'No ID specified'; } $email_length = strlen($email); $font_size = 4; $image_height = ImageFontHeight($font_size ); $image_width = ImageFontWidth($font_size ) * $email_length; $image = imagecreate ( 1521, 800 );//($image_height,$image_height); imagecolorallocate($image,255,255,255); $font_color = imagecolorallocate($image,0,0,0); imagestring($image,$font_size,0,0,$email,$font_color); imagejpeg($image); ?>

index.php

Name:

Alex



Email :

Check WHAT problem? This page should help.

2 Likes
Sponsor our Newsletter | Privacy Policy | Terms of Service