Why wont my HTTP POST request send to my webpage?
<p>Ive looked at a lot of other threads here and all over the internet and I cant seem to solve this..</p>

<p>So basically I have written this Java code:</p>

<pre><code>public void sendReport(CommandSender sender, Player target, String reason)
{
    HttpURLConnection connectionStandard = null;
    String email = config.getString("rp.site.email");
    String password = config.getString("rp.site.password");
    String senderName = sender.getName();
    String targetName = target.getDisplayName();
    String reasonString = reason;

    try
    {

        URL url = new URL("http://www.website.net/folder/connect.php");    
        HttpURLConnection request = (HttpURLConnection)url.openConnection();
        request.setRequestProperty("Content-type","application/x-www-form-urlencoded");
        request.setRequestMethod("POST");
        request.setDoOutput(true);
        OutputStreamWriter post = new OutputStreamWriter(request.getOutputStream());
        String data = URLEncoder.encode("email", "UTF-8") + "=" + URLEncoder.encode(email.toString(), "UTF-8");
        data += "&amp;" + URLEncoder.encode("password", "UTF-8") + "=" + URLEncoder.encode(password.toString(), "UTF-8");
        data += "&amp;" + URLEncoder.encode("reporter", "UTF-8") + "=" + URLEncoder.encode(senderName, "UTF-8");
        data += "&amp;" + URLEncoder.encode("reported", "UTF-8") + "=" + URLEncoder.encode(targetName, "UTF-8");
        data += "&amp;" + URLEncoder.encode("reason", "UTF-8") + "=" + URLEncoder.encode(reasonString, "UTF-8");
        post.write(data);
        post.flush();
    } catch (MalformedURLException e)
    {
        e.printStackTrace();
    } catch (IOException e)
    {
        e.printStackTrace();
    } finally
    {
        if(null != connectionStandard)
        {
            connectionStandard.disconnect();
        }
    }
}
</code></pre>

<p><br />
and basically, my php code just looks like this:</p>

<pre><code>&lt;?php

 require_once "db.php";

 $reporter-&gt;startSecureSession();

 foreach ($_POST as $post =&gt; $value) {
  $post = strip_tags($post);
  $value = strip_tags($value);
 }

 if(!(isset($_POST['email'])) or (!isset($_POST['password'])) or (!isset($_POST['reporter'])) or (!isset($_POST['reported'])) or (!isset($_POST['reason']))) {
  exit("Invalid Request");
 }

 $password = hash("sha512", $_POST['password']);

 $reporter-&gt;login(array("email" =&gt; $_POST['email'], "password" =&gt; $password), "plugin");
 if($reporter-&gt;validateClient()) {

  $reporter-&gt;sendReport($_POST);
  header("Location: logout.php");
  exit();

 } else {
  exit();
 }

?&gt;
</code></pre>

<p>When I send my details through chrome to the web page, it works and sends stuff to my database, but when I do it off my bukkit server through the command that sends the request, it doesnt :/</p>

<p>Thanks for the help :)</p>
