Oh, al ære og respekt til dig - jeg kopierer bare :-)
Hmmm nemt nok, vi skal bare søge i $return_content:
Her er den med forms (simpel - ingen javaverificering) og det hele:
<html>
<head>
<title>[bedrag]
www.mobilemail.dk [bedrag]</title>
<STYLE type="text/css">
<!--
A:link {text-decoration: none}
A:visited {text-decoration: none}
A:active {text-decoration: none}
A:hover {text-decoration: underline; color=black;}
BODY {font-family:Verdana;}
-->
</STYLE>
</head>
<body bgcolor="#464646" text="white" link="white" vlink="white" alink="white">
<FORM ACTION="<? echo $PHP_SELF; ?>" METHOD="GET">
<input type=hidden name="ip" value="123.456.789.123">
<input type=hidden name="ACTION" value="SEND">
<br><br><br><br>
<TABLE ALIGN="center" BORDER="0" CELLPADDING="0" CELLSPACING="0">
<TR><TD><CENTER>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0">
<TR><TD><CENTER>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="5">
<TR>
<TD VALIGN="TOP"><P ALIGN="RIGHT"><FONT SIZE="2" FACE="Arial"><B>modtager :</B></FONT></TD>
<TD COLSPAN="2"><INPUT TYPE="TEXT" NAME="Til" SIZE="8" MAXLENGTH="8"><FONT SIZE="2" FACE="Arial"><B> (8-cifret tlf. nr.)</B></FONT></TD></TR>
<TR><TD VALIGN="TOP"><P ALIGN="RIGHT"><FONT SIZE="2" FACE="Arial"><B>afsender :</B></FONT></TD>
<TD VALIGN="TOP" COLSPAN="2"><INPUT TYPE="TEXT" NAME="Fra" SIZE="14" onKeyUp="updateCharsLeft(this.form)" onChange="updateCharsLeft(this.form)" onkeypress="updateCharsLeft(this.form)"> <FONT SIZE="2" FACE="Arial"><B> (dit navn)</B></FONT></TD>
</TR>
<TR>
<TD VALIGN="TOP"><P ALIGN="RIGHT"><FONT SIZE="2" FACE="Arial"><B>besked :</B></FONT></TD>
<TD VALIGN="TOP"><TEXTAREA NAME="Besked" ROWS="7" COLS="23" MAXLENGTH="160" onKeyUp="updateCharsLeft(this.form)" onChange="updateCharsLeft(this.form)" onkeypress="updateCharsLeft(this.form)"></TEXTAREA></TD>
<TD VALIGN="TOP"><FONT SIZE="2" FACE="Arial"><B>max. 160 tegn<BR><BR>du har </B></FONT><INPUT TYPE="TEXT" NAME="charsLeft" SIZE="3" onFocus="blur()"><FONT SIZE="2" FACE="Arial"><B><BR> tegn tilbage</B></FONT></TD>
</TR>
<TR>
<TD VALIGN="TOP"><P ALIGN="RIGHT"><FONT SIZE="2" FACE="Arial"><B>send som :</B></FONT></TD>
<TD VALIGN="TOP">
<TABLE BORDER="0" CELLPADDING="0">
<TR>
<TD VALIGN="TOP"><INPUT TYPE="RADIO" NAME="Direkte" VALUE="off" CHECKED></TD>
<TD VALIGN="MIDDLE"><FONT SIZE="2" FACE="Arial">Normal SMS</FONT></TD>
</TR>
<TR>
<TD VALIGN="TOP"><INPUT TYPE="RADIO" NAME="Direkte" VALUE="on"></TD>
<TD VALIGN="MIDDLE"><FONT SIZE="2" FACE="Arial">Direkte besked</FONT><FONT SIZE="2" FACE="Arial" color="red"> (*)</FONT></TD>
</TR></TABLE>
</TD></TR></TABLE>
</CENTER></TD>
</TR>
<TR>
<TD COLSPAN="3"><input type=submit value="Send beskeden"></TD>
</TR></TABLE>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="10" WIDTH="400">
<TR><TD><FONT SIZE="2" COLOR="red">(*)</FONT><FONT SIZE="2" FACE="Arial">
En direkte besked vises i displayet med det samme, men gemmes ikke på modtagerens
telefon. Den kan derfor nemt blive slettet, hvis modtageren får en anden besked
eller et opkald.</FONT></TD></TR>
</TABLE></CENTER></TD></TR></TABLE>
</FORM>
<?
function pullpage( $method, $host, $usepath, $postdata ) {
# open socket to filehandle
$fp = fsockopen( $host, 80, &$errno, &$errstr, 120 );
# user-agent name
$ua = "UserAgent/1.0";
if( !$fp ) {
print "$errstr ($errno)<br>\n";
}
else {
if( $method == "GET" ) {
fputs( $fp, "GET $usepath HTTP/1.1\n" );
fputs( $fp, "Host:
www.mobilemail.dk\n" );
}
else if( $method == "POST" ) {
fputs( $fp, "POST $usepath HTTP/1.1\n" );
fputs( $fp, "Host:
www.mobilemail.dk\n" );
}
fputs( $fp, "User-Agent: ".$ua."\n" );
fputs( $fp, "Accept: */*\n" );
fputs( $fp, "Accept: image/gif\n" );
fputs( $fp, "Accept: image/x-xbitmap\n" );
fputs( $fp, "Accept: image/jpeg\n" );
if( $method == "POST" ) {
$strlength = strlen( $postdata );
fputs( $fp,
"Content-type: application/x-www-form-urlencoded\n" );
fputs( $fp, "Content-length: ".$strlength."\n\n" );
fputs( $fp, $postdata."\n" );
}
fputs( $fp, "\n" );
$output = "";
# while content exists, keep retrieving document in 1K chunks
while( !feof( $fp ) ) {
$output .= fgets( $fp, 1024 );
}
fclose( $fp );
}
return $output;
}
if ($ACTION=='SEND') {
$PostData = "ip=123.456.789.123&to=".$Til."&sender=".$Fra."&message=".$Besked."&online=".$Direkte;
$return_content = pullpage("POST", "
www.mobilemail.dk", "/sms/sendsms.cgi", $PostData);
$fundet = strpos($return_content, "Beskeden er leveret");
if (is_string ($fundet) && !$fundet) { // Virker ikke i php4, men i tidligere versioner
echo "<H1>Telefonen er slukket</H1>\n";
}
else {
echo "<H1>Beskeden er afleveret</H1>\n";
}
}
?>
</BODY></HTML>