So let me see if I have this right, the following is a very crude version of what i think i'm supposed to do:
<TD><normalfont><B>User Name:</B></normalfont></TD>
<TD><INPUT TYPE="TEXT" NAME="$username" SIZE=25 MAXLENGTH=25>
</TD>
</TR>
<TD><normalfont><B>Password:</B></normalfont></TD>
<TD><INPUT TYPE="PASSWORD" NAME="$password" SIZE=25 MAXLENGTH=15> </TD></TR>
<TD><normalfont><B>Email:</B></normalfont><br>
<smallfont>Please enter a valid email address. You can choose to hide it below in the preferences section.</smallfont></TD>
<TD><INPUT TYPE="TEXT" NAME="$email" SIZE=25 MAXLENGTH=50>
</TD>
</TR>
PostToHost("www.everyone.net","/whatever/signup2.php","everyonename=".urlencode($username). "&everyoneemail=".urlencode($e mail)."&everyonepassword=".urlencode($password)."" );
function PostToHost($host, $path, $data_to_send) {
$fp = fsockopen($host,80);
fputs($fp, "POST $path HTTP/1.1\n");
fputs($fp, "Host: $host\n");
fputs($fp, "Content-type: application/x-www-form-urlencoded\n");
fputs($fp, "Content-length: ".strlen($data_to_send)."\n");
fputs($fp, "Connection: close\n\n");
fputs($fp, $data_to_send);
while(!feof($fp)) {
echo fgets($fp, 128);
}
fclose($fp);
}
//end
So that's basically it? Everyoneemail is the imaginary name that everyone.net uses for the form (i havent checked to see the real one).
Based on that, is my code correct?
|