Я PHP только начинаю изучать, поэтому не пинайте и не ругайте меня. Вот скрипт:
<?php
set_time_limit(0);
//-----------------//
$komy = "Alex";
$otkogo = "test";
$msg = "hello word";
//-----------------//
/* Кидаем смс-ку */
$ch = curl_init("http://***********.ru/ccc-php/sms/index.php");
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.4) Gecko/2008102920 AdCentriaIM/1.7 Firefox/3.0.4");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "action=send&msisdn=".urlencode($komy)."&from=".urlencode($otkogo)."&msg=".urlencode($msg)."&submit=Send");
curl_setopt($ch, CURLOPT_REFERER, "http://*********.ru/index.php");
curl_setopt($ch, CURLOPT_COOKIEJAR, "./cook");
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$res_index = curl_exec($ch);
?>
Как сделать, чтобы форму можно было заполнять на сайте, а не в самом скрипте? Я как только не делал, у меня не ничего не получалось.