I'm making a tor website that people can report sites to us (CP etc) and we will remove them. We are using an html form that submits via POST to php and then it E-Mails us the information. The problem I'm getting is:
Error 405: Method Not Supported
Only GET and HEAD requests supported for this resource.
Here is the code i am using: HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Report site - Tor's anti-terrorism campaign.</title>
<style>
h1
{
font-family:Verdana, Geneva, sans-serif;
font-size:36px;
color:#060;
}
h2
{
font-family:Verdana, Geneva, sans-serif;
font-size:16px;
color:#C33;
}
</style>
</head>
<body>
<h1>Report a site on Tor for us to hopefully take down</h1>
<h2>Sites that are listed as inappropriate material for us are:</h2>
<h2>Child pornography</h2>
<h2>Terrorist sites</h2>
<h2>Piracy sites <i>that contain child pornography or terrorist material</i></h2>
<hr />
<h2 style="color:#030"><B>Things that are actually OK:</B></h2>
<h2 style="color:#030">Black markets</h2>
<h2 style="color:#030">Copyrighted material</h2>
<h2 style="color:#030">Piracy sites</h2>
<br />
<p>Any other site you would like to report please enquire about at CONTACT INFO.</p>
<hr />
<form method="post" action="form_handler.php" name="Report">
<p>
<input type="hidden" name="derive_fields" value="email=EmailAddr,realname=FullName">
<br />
<br />
Contact E-Mail Address:
<input type="text" name="email" placeholder="thats@riseup.net" size="50">
<br />
<br />
First Name(Put anonymous to not be named):
<input type="text" name="first_name" placeholder="John" size="50">
<br />
<br />
.Onion address or web address:
<input type="text" name="onion" placeholder="e.g. dwonbdbwqdb3.onion" size="50">
</p>
<p>
Name of organization (if known): <input type="text" name="org" placeholder="organization name" size="31.75">
</p>
<p>
What is it?<select name="Type" multiple="multiple" size="5">
<option value="Terrorism">Terrorism</option>
<option value="CP">Child porn</option>
<option value="Other">Other</option>
</select>
<input type="submit" value="Submit" class="rc-button rc-button-submit">
</p>
</form></body>
</html>
And the PHP:
<?php
if(isset($_POST['submit'])){
$to = "thats@riseup.net";
$from = $_POST['email'];
$first_name = $_POST['first_name'];
$subject = "Form submission";
$onion = $_POST['onion'];
$org = $_POST['org'];
$type = $_POST['Type'];
$message = $first_name . "Here is the stats for the form submitted about the site" $onion . " " . $org . " " . $type;
mail($to,$subject,$message);
echo "Mail Sent. Thank you " . $first_name . ";
}
?>
Any help would be good! Thanks The html was made half by me and half by my friend and I completely wrote all the PHP so it will be the PHP which is probably wrong :)