Subscribe
$f_yourname=$_REQUEST['f_yourname'];
$f_email=$_REQUEST['f_email'];
$error=0;
$fieldstocheck=$f_yourname.$f_email;
if (!(strlen($f_yourname)>0))
{
die(‘Error, Name field is empty’);
$error=1;
}
if (!(strlen($f_email)>0))
{
die(‘Error, Email field is empty’);
$error=1;
}
if(eregi(“MIME”,$fieldstocheck))
{
die(‘Get out, spammer.’);
$error=1;
}
if(eregi(“@”,($f_yourname)))
{
die(‘Invalid characters in name’);
$error=1;
}
if(eregi(“www”,$fieldstocheck))
{
die(‘Invalid characters in data’);
$error=1;
}
if (eregi(“http”,$fieldstocheck))
{
die(‘Invalid characters in data’);
$error=1;
}
if (eregi(“Content-Type”,$fieldstocheck))
{
die(‘Get out, spammer.’);
$error=1;
}
if(eregi(“charset”,$fieldstocheck))
{
die(‘Get out, spammer.’);
$error=1;
}
if ($error==0)
{
$data = “?Submit=Submit”;
$data.= “&subscriber_name=”.$f_yourname;
$data.= “&subscriber_email=”.$f_email;
$data.= “&campaign_name=webdevforager”;
$url = “http://www.getresponse.com/cgi-bin/add.cgi”;
$ch = curl_init(); // initialize curl handle
curl_setopt($ch, CURLOPT_URL,$url); // set url to post to
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); // return into a variable
curl_setopt($ch, CURLOPT_TIMEOUT, 6); // times out after 4s
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data); // add POST fields
$result = curl_exec($ch); // run the whole process
}
?>
Thank You echo $f_yourname;?>.
You have been added to our subscribers list and will receive updates to your email box at =$f_email;?>
We will keep you informed by email of all new additions to the WebDevForager.
To your success,
The WebDevForager