ANTICHAT.XYZ    VIDEO.ANTICHAT.XYZ    НОВЫЕ СООБЩЕНИЯ    ФОРУМ  
Баннер 1   Баннер 2
Antichat снова доступен.
Форум Antichat (Античат) возвращается и снова открыт для пользователей. Здесь обсуждаются безопасность, программирование, технологии и многое другое. Сообщество снова собирается вместе.
Новый адрес: forum.antichat.xyz
Вернуться   Форум АНТИЧАТ > Программирование > PHP, PERL, MySQL, JavaScript
   
 
 
Опции темы Поиск в этой теме Опции просмотра

привет -)
  #11  
Старый 25.07.2008, 01:59
Аватар для СССР
СССР
Новичок
Регистрация: 05.01.2007
Сообщений: 9
Провел на форуме:
63718

Репутация: 2
По умолчанию привет -)

еше раз доброе время суток=) помогите а??-)
PHP код:
<?php
    
### change this
    
    
$send_to_email "jkh@kdjfblalalal";
    
$send_from_email "forma2istics.com";
    
$email_subject "New website registration";
    
$success_page "success.html";
    
$failure_page "failure.html";
    
##########
    
    
function send_mail($from$to$subject$message)
    {
        return 
mail($to$subject$message,
                 
"From: {$from}rn" .
                 
"Reply-To: {$from}rn" .
                 
"X-Mailer: PHP/" phpversion());    
    }
    
    if (
$_POST['action'] == "contact")
    {
        
$Your_full_name $_POST['Your_full_name'];
        
$Contact_phone $_POST['Contact_phone'];
        
$Name_of_your_company $_POST['Name_of_your_company'];
        
$Email $_POST['Email'];
                
$Shipment_station $_POST['Shipment_station'];
                
$Destination_station $_POST['Destination_station'];
                
$Description_of_cargo_TNVED_code $_POST['Description_of_cargo_TNVED_code'];
                
$Shipment_mode $_POST['Shipment_mode'];
                
$Rail_car_type $_POST['Rail_car_type'];
                
$Car_loading $_POST['Car_loading'];
                
$Affiliation_of_car_or_container $_POST['Affiliation_of_car_or_container'];
                
$Volume_of_shipment $_POST['Volume_of_shipment'];
                
$Kind_of_packing $_POST['Kind_of_packing'];
                
$Container_type_size_of_pallet_or_case $_POST['Container_type_size_of_pallet_or_case'];
                
$Weight_of_1_piece $_POST['Weight_of_1_piece'];
                
$Your_additional_information $_POST['Your_additional_information'];


        
        
$message "Contact details:\nYour_full_name: $Your_full_name\nContact_phone: $Contact_phone\nName_of_your_company: $Name_of_your_company\nEmail: $Email\nShipment_station: $Shipment_station\nDestination_station: $Destination_station\nDescription_of_cargo_TNVED_code: $Description_of_cargo_TNVED_code\nShipment_mode: $Shipment_mode\nRail_car_type: $Rail_car_type\nCar_loading: $Car_loading\nAffiliation_of_car_or_container: $Affiliation_of_car_or_container\nVolume_of_shipment: $Volume_of_shipment\nKind_of_packing : $Kind_of_packing \nContainer_type_size_of_pallet_or_case: $Container_type_size_of_pallet_or_case\nWeight_of_1_piece: $Weight_of_1_piece\nYour_additional_information: $Your_additional_information\nn";
        
$result send_mail($send_from_email$send_to_email$mail_subject$message);
        if (
$result)
        {
            
header('Location: '.$success_page);  
        } 
        else
        {
            
header('Location: '.$failure_page);
        }
    }
?>

наешл капчу , а то спам приходит тонами
PHP код:
<?
session_start
();
session_register("secret_number");

if (
intval($_SESSION["secret_number"])<1000) {
    
srand(doubleval(microtime()));
    
$_SESSION["secret_number"]=rand(1000,9999);
    }

if (
$_SERVER["REQUEST_METHOD"]=="POST") {

    
$error=0;
    if (
$_POST["secretcode"]!=$_SESSION["secret_number"] || intval($_POST["secretcode"])==0$error=1;

    if (
$error==0) {
        
$_SESSION["secret_number"]=rand(1000,9999);

        
// Выполняем необходимые действия с данными
        // ..
        
print "Hello ".htmlspecialchars(StripSlashes($_POST["email"]));
        exit;
        }

    if (
$error==1) print "<font color=red>Число с картинки введено неверно</font>";
    }

// Выводим форму повторно
// ...
?>
<form action="index.php" method="post">
Ваш E-Mail:<br>
<input type="text" name="email" value=""><br>
<br>
Введите код, который вы видете на картинке:<br>
<input type="text" name="secretcode" value=""><br>
<img src='code.php?<?=doubleval(microtime());?>' width=101 height=26 vspace=5>
<br><br>
<input type="submit">
</form>
PHP код:
?
// Регистрируем переменную
session_start();
session_register("secret_number");

function 
mt() {
    list(
$usec$sec) = explode(' 'microtime());
    return (float) 
$sec + ((float) $usec 100000);
    }

header("Content-type: image/png");

// создаем изображение
$im=imagecreate(10126);

// Выделяем цвет фона (белый)
$w=imagecolorallocate($im255255255);
 
// Выделяем цвет для фона (светло-серый)
$g1=imagecolorallocate($im192192192);

// Выделяем цвет для более темных помех (темно-серый)
$g2=imagecolorallocate($im64,64,64);

// Выделяем четыре случайных темных цвета для символов
$cl1=imagecolorallocate($im,rand(0,128),rand(0,128),rand(0,128));
$cl2=imagecolorallocate($im,rand(0,128),rand(0,128),rand(0,128));
$cl3=imagecolorallocate($im,rand(0,128),rand(0,128),rand(0,128));
$cl4=imagecolorallocate($im,rand(0,128),rand(0,128),rand(0,128));

// Рисуем сетку
for ($i=0;$i<=100;$i+=5imageline($im,$i,0,$i,25,$g1);
for (
$i=0;$i<=25;$i+=5imageline($im,0,$i,100,$i,$g1);

// Выводим каждую цифру по отдельности, немного смещая случайным образом
imagestring($im50+rand(0,10), 5+rand(-5,5), substr($_SESSION["secret_number"],0,1), $cl1);
imagestring($im525+rand(-10,10), 5+rand(-5,5), substr($_SESSION["secret_number"],1,1), $cl2);
imagestring($im550+rand(-10,10), 5+rand(-5,5), substr($_SESSION["secret_number"],2,1), $cl3);
imagestring($im575+rand(-10,10), 5+rand(-5,5), substr($_SESSION["secret_number"],3,1), $cl4);

// Выводим пару случайных линий тесного цвета, прямо поверх символов.
// Для увеличения количества линий можно увеличить,
// изменив число выделенное красным цветом
for ($i=0;$i<8;$i++) imageline($im,rand(0,100),rand(0,25),rand(0,100),rand(0,25),$g2);


// Коэфициент увеличения/уменьшения картинки
$k=1.7;

// Создаем новое изображение, увеличенного размера
$im1=imagecreatetruecolor(101*$k,26*$k);

// Копируем изображение с изменением рамеров в большую сторону
imagecopyresized($im1$im0000101*$k26*$k10126); 

// Создаем новое изображение, нормального размера
$im2=imagecreatetruecolor(101,26); 
а вот сама как бы страничка
Код HTML:
<html>
<head>
<title></title>
<link rel="SHORTCUT ICON" href="">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="ROBOTS" content="index, follow">
<meta name="REVISIT-AFTER" content="7 days">
<meta name="COPYRIGHT" content="">

<meta name="AUTHOR" content="">

<LINK rel="STYLESHEET" href="styles.css">
</head>

<BODY  align="center" topmargin="0" leftmargin="0" marginwidth="0" marginheight="0" style="background-color: #ffffff;">
<center>

<table width=968 height=117  border="0" cellspacing="0" cellpadding="0">
    <tr>

  <td width=242 valign=top class="t1">
  </td>
  <td width=484 valign=top class="t2">
  <table width=400 height=92  border="0" cellspacing="0" cellpadding="0">
 <tr>
  <td width=400 align=right valign=top >
  <a href=""><img src="img/home.gif" border=0></a><img src="img/p1.gif" border=0><a href=""><img src="img/mail.gif" border=0></a>
  </td>
  </tr>
</table>
  <a style="color: #06018f; font-size: 13px; font-family: Arial;"><b>FORWARDING, <b></a>
   <a style="color: #336691; font-size: 13px; font-family: Arial;"><b>CHARTERING, <b></a>
   <a style="color: #3b60c8; font-size: 13px; font-family: Arial;"><b>CUSTOMS SERVICES<b></a>
 </td>

  <td width=242 valign=top class="t4">
  </td>
 </tr>
</table>

<table width=968 height=117  border="0" cellspacing="0" cellpadding="0">
 <tr>

  <td width=242 valign=top class="t5">
  </td>
  <td width=484 valign=top align=left  class="t6">
   <a style="padding-left:80px; color: #000000; font-size: 25px; font-family: Arial;"><b>tel:+380 4841 48446 </a>  </td>
  <td width=242 valign=top class="t8" >
  </td>

 </tr>
</table>

<table width=970 height=9  border="0" cellspacing="0" cellpadding="0" >
<tr>
  <td width=970 height=9 valign=top style="background-image: url('img/per.gif');">
  </td>

  </tr>
</table>
</head>
<body>
<h3> <strong>Форма заявки для расчета провозных платежей и стоимости экспедирования на ж/дорожном транспорте </strong> </h1>
<form method="post" action="send_details.php">
<input type="hidden" name="action" value="contact" />
<table width="98%">
<tr>
	<td width="62%" height="37">Ваши полные ФИО:</td>
	<td width="38%"><input type="text" size="100" name="Your_full_name" value="" /></td>
</tr>
<tr>
	<td height="37">Контактный телефон, с кодом города:</td>
	<td><input type="text" size="100" name="Contact_phone" value="" /></td></tr>
<tr>
	<td height="46">Название Вашей организации:</td>
	<td><input type="text" size="100" name="Name_of_your_company" value="" /></td></tr>
<tr>
	<td height="48">E-mail:</td>
	<td><input type="text"size="100"  name="Email" value="" /></td></tr>
<tr>
	<td height="60"> Станция отправления:</td>
	<td><input type="text" size="100" name="Shipment_station" value="" /></td></tr>
<tr>
	<td height="40"> Станция назначения:</td>
	<td><input type="text"size="100"  name="Destination_station" value="" /></td></tr>
<tr>
	<td height="44">Наименование груза, коды ЕТСНГ и ГНГ:</td>
	<td><input type="text" size="100" name="Description_of_cargo_TNVED_code" value="" /></td></tr>
<tr>
	
<tr>
	<td height="34"> Род вагона:</td>
	<td><input type="text"size="100" name="Rail_car_type" value="" /></td></tr>
<tr>
	<td height="35"> Загрузка вагона:</td>
	<td><input type="text"size="100" name="Car_loading" value="" /></td></tr>
<tr>
	<td height="43"> Принадлежность вагона или контейнера (парк МПС, собственный, арендованный):</td>
	<td><input type="text"size="100" name="Affiliation_of_car_or_container" value="" /></td></tr>
<tr>
	<td height="47"> Объём отправляемой партии (тн или м3 или кол-во мест):</td>
	<td><input type="text"size="100" name="Volume_of_shipment"value="" /></td></tr>
<tr>
	<td height="50"> Вид упаковки (навалом, паллеты, тюки, биг-бэги, ящики, контейнеры):</td>
	<td><input type="text"size="100" name="Kind_of_packing" value="" /></td></tr>
<tr>
	<td height="57">  Вид контейнера, размеры паллета или ящика, объём тюка или биг-бэга:</td>
	<td><input type="text"size="100" name="Container_type_size_of_pallet_or_case" value="" /></td></tr>
<tr>
	<td height="44">  Вес одного места:</td>
	<td><input type="text"size="100" name="Weight_of_1_piece" value="" /></td></tr>
<tr>
	<td height="63"><p>Ваша дополнительная информация:
	  (для специальных и негаборитных грузов предоставить чертижы,эскизы с указанием габаритных размеров,либо указать степень негабаритности груза, предлогаемые сроки отправки груза, а также объём грузовой партии и т.д):</p>
	  <p>&nbsp;</p>
	  <p>:      </p></td>
	<td><textarea rows="6" name="Your_additional_information" cols="97"></textarea></td>
</tr>
<tr>
	<center><td height="109" colspan="2"><input name="submit" type="submit" value="Send" /></td>
</tr>
</table>
</form>
<tr>

<table width=970 height=76  border="0" cellspacing="0" cellpadding="0" >
<tr>
  <td width=970 height=76 valign=top style="background-image: url('img/bot.gif');">

  <table width=970 height=76  border="0" cellspacing="0" cellpadding="0" >
  <tr>
  <td width=6 height=76 valign=top style="background-image: url('img/p2.gif');">  </td>
  <td width=964 height=76 valign=top style="padding-left:5px; padding-top: 5px;"><div align="center">Danompany LTD <br>
    P.O.Box # 124, Centre 35,Dzerzinskogo str.l,68600,Ukraine<br>
    <a href="mailto:dlet.ua"> E-mai det.ua</a><br>
    tel:+380 4841 446 <br>
    mob.tel: +380528 <br>
  </div></td>
  </tr>
</table>

  </td>

  </tr>
</table>



</BODY>
</html>
я не могу понять как это все дела слепить в одно что б на странички была капча и при пральном воде капче отсылалсь на мыло -) не пинайте сильно сам знаю что туплю =)
 
Ответить с цитированием
 



Похожие темы
Тема Автор Раздел Ответов Последнее сообщение
[c/c++] Новичкам: задаем вопросы _Great_ С/С++, C#, Delphi, .NET, Asm 5420 17.06.2010 13:33
Интернетчики задали российскому президенту очень странные вопросы podkashey Мировые новости 4 07.07.2006 16:53
Вопросы по Ipb 2.0 Voodoo_People Форумы 26 15.02.2005 22:57



Здесь присутствуют: 1 (пользователей: 0 , гостей: 1)
 


Быстрый переход




ANTICHAT.XYZ