View Full Version : POST and fsockopen()

06-19-2006, 01:21 AM
Hi Guys

What I have done is change from one autoresponder company to another
I have exported my email lists from previuos company.Now what happens
is if I POST via a WEB FORM that email goes into the lead list and no verification is sent to my lead.If I add by fsockopen() the lead is added to my lead list but
a confirmation email is sent to my lead.This I want to prevent cause I have
changed before and I donot want to get a impression with my leads.

So I donot want to add all 30 000 emails manually , I thought doing by fsockopen() is a better option, but then there is the barrier of the confirmation
email.Can I overcome this please

Here is my php script

# $host includes host and path and filename
# ex: "myserver.com/this/is/path/to/file.php"
# $query is the POST query data
# ex: "a=thisstring&number=46&string=thatstring
# $others is any extra headers you want to send
# ex: "Accept-Encoding: compress, gzip\r\n"
function post($host,$query,$others=''){
$post="POST $path HTTP/1.1\r\nHost: $host\r\nContent-type: application/x-www-form-urlencoded\r\n${others}User-Agent: Mozilla 4.0\r\nContent-length: ".strlen($query)."\r\nConnection: close\r\n\r\n$query";
return $r;

Here is my query string


$email and $name come from my leads file

and here is my web form information

<CENTER><FORM METHOD="POST" ACTION="http://www.autorespondercompany.com/scripts/addlead.pl">
<input type="hidden" name="unit" value="my_list">
<input type="hidden" name="redirect" value="http://www.example.com/thanks.htm">
<input type="hidden" name="meta_adtracking="manual_form">
<input type="hidden" name="meta_message" value="1">
<input type="hidden" name="meta_required" value="name,from">
<input type="hidden" name="meta_forward_vars" value="0">
<TR><TD COLSPAN=2><CENTER>For More Information</CENTER></TD></TR>
<TR><TD>Your Name: </TD><TD><input TYPE="text" name="name" size="20"></TD></TR>
<TR><TD>Your E-mail Address:</TD><TD><input TYPE="text" name="from" size="20">
<INPUT TYPE="SUBMIT" NAME="submit" VALUE="Submit"></TD></TR>

I have also tested


on by posting to my own page using the form and I get

Host: www.me.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20060508 Firefox/
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Referer: http://www.me.com/testaweberform.php
Content-Type: application/x-www-form-urlencoded
Content-Length: 170

Please help, all I want is the fsockopen() connection to be treated the same as a POST so that a verification mail is not sent to my list of 30 000 leads.


06-19-2006, 07:54 AM
Echo out $post, in <pre></pre> tags, see what it gives you. There is perhaps a problem there somewhere.

echo $post;