fax-versturen
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Fax versturen</title></head>
<body>
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?
if (!$HTTP_POST_VARS["submit"])
{
// toon formulier
echo "<FORM METHOD=\"POST\" ACTION=\"$PHP_SELF\" name=\"SendFaxForm\">
<P>
Naam ontvanger<br />
<input type=\"text\" size=\"40\" name=\"recipient_a\" /><br />
Kamer: (optioneel)<br />
<input type=\"text\" size=\"40\" name=\"recipient_b\" /><br />
Het fax nummer: (voorbeeld: +31582665566)<br />
<input type=\"text\" size=\"40\" maxlength=\"18\" name=\"destnumber\" /><br />
Onderwerp: (optioneel)<br />
<input type=\"text\" size=\"40\" name=\"subject\" /><br />
Jou e-mail adres: (wordt bevestigings e-mail heen gestuurd)<br />
<input type=\"text\" size=\"40\" name=\"originator_email\" /><br />
Het fax bericht:<br />
<textarea name=\"body_text\" rows=\"15\" cols=\"70\" wrap=\"VIRTUAL\"></textarea><br />
<input type=\"submit\" name=\"submit\" value=\"Fax it!\" /> <input type=\"reset\" value=\"Clear it!\" />
</P>
</FORM>";
}
else
{
// roep het tpcfax.pl bestand aan van tpc.int
$fp = fopen("http://cgi.tpc.int/cgi-bin/tpcfax.pl?recipient_a=$HTTP_POST_VARS[recipient_a]&recipient_b=$HTTP_POST_VARS[recipient_b]&destnumber=$HTTP_POST_VARS[destnumber]&subject=$HTTP_POST_VARS[subject]&originator_email=$HTTP_POST_VARS[originator_email]&body_text=$HTTP_POST_VARS[body_text]","r");
$answer = fread ($fp, 10000); // $answer is het 'fax been sent' bericht van tpcfax.pl
echo "<P>Fax verstuurd naar: $HTTP_POST_VARS[destnumber]</P>";
echo "<P><strong>Deze FAX is aangeboden door Demon.</strong></P>";
}
?>
if (!$HTTP_POST_VARS["submit"])
{
// toon formulier
echo "<FORM METHOD=\"POST\" ACTION=\"$PHP_SELF\" name=\"SendFaxForm\">
<P>
Naam ontvanger<br />
<input type=\"text\" size=\"40\" name=\"recipient_a\" /><br />
Kamer: (optioneel)<br />
<input type=\"text\" size=\"40\" name=\"recipient_b\" /><br />
Het fax nummer: (voorbeeld: +31582665566)<br />
<input type=\"text\" size=\"40\" maxlength=\"18\" name=\"destnumber\" /><br />
Onderwerp: (optioneel)<br />
<input type=\"text\" size=\"40\" name=\"subject\" /><br />
Jou e-mail adres: (wordt bevestigings e-mail heen gestuurd)<br />
<input type=\"text\" size=\"40\" name=\"originator_email\" /><br />
Het fax bericht:<br />
<textarea name=\"body_text\" rows=\"15\" cols=\"70\" wrap=\"VIRTUAL\"></textarea><br />
<input type=\"submit\" name=\"submit\" value=\"Fax it!\" /> <input type=\"reset\" value=\"Clear it!\" />
</P>
</FORM>";
}
else
{
// roep het tpcfax.pl bestand aan van tpc.int
$fp = fopen("http://cgi.tpc.int/cgi-bin/tpcfax.pl?recipient_a=$HTTP_POST_VARS[recipient_a]&recipient_b=$HTTP_POST_VARS[recipient_b]&destnumber=$HTTP_POST_VARS[destnumber]&subject=$HTTP_POST_VARS[subject]&originator_email=$HTTP_POST_VARS[originator_email]&body_text=$HTTP_POST_VARS[body_text]","r");
$answer = fread ($fp, 10000); // $answer is het 'fax been sent' bericht van tpcfax.pl
echo "<P>Fax verstuurd naar: $HTTP_POST_VARS[destnumber]</P>";
echo "<P><strong>Deze FAX is aangeboden door Demon.</strong></P>";
}
?>
</body>
</html>