Terabyte
Advanced Member | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору exMIB Ты его проверял работу, ато у меня при загрузке humancheck_form.php куча ошибок вылетает: Цитата: Warning: session_start(): The session id contains invalid characters, valid characters are only a-z, A-Z and 0-9 in /usr/home/wh/public_html/zz/humancheck_form.php on line 15 Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /usr/home/wh/public_html/zz/humancheck_form.php:15) in /usr/home/wh/public_html/zz/humancheck_form.php on line 15 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /usr/home/wh/public_html/zz/humancheck_form.php:15) in /usr/home/wh/public_html/zz/humancheck_form.php on line 15 Warning: Unknown(): The session id contains invalid characters, valid characters are only a-z, A-Z and 0-9 in Unknown on line 0 Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0 | Цитата: <?PHP ############################################# # Project: HumanCheck 2 # file: humancheck_config.php # company: Horobey Freelance & Telecommuting (http://horobey.com/) # author: Yuriy Horobey (yuriy@horobey.com) # purpose: # shows form with image tag with slight editing can be included into existing form in a html file # # ############################################# $sid = session_id(); if(!$sid){ session_start(); $sid = session_id(); } require(dirname(__FILE__)."/humancheck_config.php"); //1) lets generate the code $noautomationcode = ""; for($i=0; $i<$config_max_digits;$i++) $noautomationcode = $noautomationcode.rand(0,9); //save it in session $HTTP_SESSION_VARS["noautomationcode"] = $noautomationcode; //show form ################################################### HERE YOU MAY EDIT ####################################### $html_form =<<< EHTML <!-- the secret image --> <img src='humancheck_showcode.php?sid=$sid'> <!-- the form --> <form action='humancheck_check.php' method='post'> <input type='hidden' name='sid' value='$sid'> <input type='text' name='code'> <input type='Submit' name='Submit'> </form> EHTML; ############################################################################################################# echo($html_form); ?> | Кстати, на локалхосте у меня вообще по видимому ф-ция ImageCreateFromJpeg() не поддерживается. Как сделать чтобы поддерживалась? |