After looking a bit around I came to this page. Here, I found some code to send a C# string to a PHP page.
However, after implementing it in my own program it did not work. Here is my code:
private void executesend()
{
using (WebClient client = new WebClient())
{
client.UploadString(url,"POST",keys);
}
}
For the PHP part, I have:
<?php
mysql_connect("localhost", "", "") or die(mysql_error()); // Connect to database server(localhost) with username and password.
mysql_select_db("dimittv89_dayz") or die(mysql_error()); // Select registration database.
$name = $_GET["message"];
if ( $_SERVER['REQUEST_METHOD'] == 'POST' )
{
$name = file_get_contents('php://input');
$opdracht = "INSERT INTO 'keys', (`key`) VALUES ('$name')";
print $name;
}
if (mysql_query($opdracht)){
echo "succesfully registerd to the melloniax u wil now be returned to our main page";
}
else{
echo "hey something went wrong there ! please try again in a minute";
}
?>
In the same topic one of the users also said to try this:
php?fmessage=testtesttest"
and write down the output using
$name = $_GET["message"];
print $name;
This did not work either. Am I doing something wrong?
Thanks for the help already
Well sofar i found out its not the send value thats wrong but the get value :
Username = Registry.CurrentUser.OpenSubKey("Username", true);
Name = "" + Username.GetValue("Uid");
in the regedit menu it says that the value is a REG_BINARY, are these readable with getvalue ?