"; if ($_REQUEST["action"]=="read" or $_REQUEST["action"]=="empty" or $_REQUEST["action"]=="send" or $_REQUEST["action"]=="delete") { if (!mysql_connect($dbhost,$dbuser,$dbpass) || !mysql_select_db($dbname)) { die("Could not connect: ".mysql_error()); } else { mysql_query('SET CHARACTER SET utf8'); } } if ($_REQUEST["action"]=="read" or $_REQUEST["action"]=="delete") { //READ MESSAGES AND MAYBE DELETE ONE if ($_REQUEST["action"]=="delete") { //DELETE MESSAGE mysql_query("DELETE FROM messages WHERE ID='".ID($_REQUEST["key"])."' AND DATE='".mysql_real_escape_string($_REQUEST["messagedate"])."'"); } $ID=ID($_REQUEST["key"]); echo "
Showing messages for ID $ID.
Give this link or your ID to others to receive messages.
"; $res=mysql_query("SELECT text,date FROM messages WHERE ID='".ID($_REQUEST["key"])."' ORDER BY date DESC"); echo "
"; while ($row=mysql_fetch_array($res)) echo "
Date: ".$row["date"]."   Size: ".strlen($row["text"])." bytes.   Delete
".preg_replace(array("/\n/","/(-----BEGIN PGP MESSAGE-----.+?-----END PGP MESSAGE-----)/s"),array("
"; echo "
Empty the inbox
"; echo "
Send a message
"; } elseif ($_REQUEST["action"]=="send") { //SEND MESSAGE $text=html_entity_decode($_REQUEST["text"],ENT_COMPAT,"UTF-8"); if (strlen($_REQUEST["ID"])!=12) { echo "
You didn't give the recepient's ID.
Go back and retry.

"; } elseif (strlen($_REQUEST["text"])>$maxsize) { echo "
Your message is ".strlen($text)." bytes long.
The maximum allowed is $maxsize.
Go back and retry with a smaller message.

"; } else { mysql_query("INSERT INTO messages VALUES ('".mysql_real_escape_string($_REQUEST["ID"])."','".mysql_real_escape_string($text)."',NOW())"); if (mysql_error()) { echo "
Error sending message: ".mysql_error()."
"; } else { echo "
Message sent!
"; } echo "Message size: ".strlen($text)." bytes.

"; } if ($_REQUEST["key"]) echo "
Check your inbox
"; echo "
Send a message
"; } elseif ($_REQUEST["action"]=="empty") { //EMPTY INBOX mysql_query("DELETE FROM messages WHERE ID='".ID($_REQUEST["key"])."'"); echo "The inbox has been emptied!

"; echo "
"; } elseif ($_REQUEST["action"]=="whynot") { //SHOW WHYNOT echo "

"; echo "
"; } elseif ($_REQUEST["action"]=="API") { //SHOW API echo "


"; echo "
ganjlePM handles all \$_REQUEST parameteres. That means that you can send/receive/delete messages by POST or GET. Below you can find the parameters for each action:

Send message: action=send, text=whatever, ID=whatever

Read messages: action=read, key=yourkey
(the message count is inside a div of that belongs to the class notifierdata and message text along with size/date/delete_link are inside divs that belongs to the class message)

Empty inbox: action=empty, key=yourkey

Delete message: action=delete, key=yourkey, messagedate=whatever
(messagedate should be exactly what is printed as date when you read the message)

"; } else { //NO ACTION: SHOW MAIN PAGE $key=hash("sha256",rand()."|".rand()."|".rand()."|".rand()."|".rand()); $ID=ID($key); echo "Allowing you to send and receive messages without registration, cookies or javascript.

To receive messages just give this link/ID to anyone: $ID
If you need more IDs and inboxes just refresh this page!

You can read your messages using this link: $ID Inbox
Do not loose your inbox link because it can't be restored!

This service offers privacy not security or authentication so use GPG as required.
"; if ($_REQUEST["key"]) { echo "
"; } else { echo ""; } echo "

Recipient ID:  
"; echo "

"; if ($_REQUEST["key"]) echo "
Check your inbox
"; } ?> service
privacy information
eco-friendly hosting

contact us via PM or