Thank you Rendril! array|boolean mds_is_itc(string $itc)
Returns false if invalid ITC is supplied,
otherwise it returns an array with item information. ["id"] - The ID of the item itself. ["uid"] - The ID of the owner!
["playername"] - The playername of the owner ["name"] - The name of the object (ie: "Silver Coin") ["creationdate"] - When it was created (as epoch seconds I think?) ["transferdate"] - last transfer date (also as epoch secondS?) ["tag"] - Tag ("tool", "Valuable", "enchanted, consumable", etc)
When inputting an item transfer code, never use the full string, it will be treated as invalid and return false.
I find it best to copy from the ITC to MDI of the code, that is all it needs to identify the creature. if(isset(@input['submit']))//check that button was clicked
{
@vc= mds_is_itc(@input['ctc0']);
if (@vc) {
echo "<table border=1>";
echo "<tr><td>Item Name:</td><td>".@vc["name"]."</td></tr>";
echo "<tr><td>Item ID:</td><td>".@vc["id"]."</td></tr>";
echo "<tr><td>Owner ID:</td><td>".@vc["uid"]."</td></tr>";
echo "<tr><td>Owner Playername: </td><td>".@vc["playername"]."</td></tr>";
echo "<tr><td>Created:</td><td>".date("F j, Y, g:i a",@vc["creationdate"])."</td></tr>";
echo "<tr><td>Last Transfer:</td><td>".date("F j, Y, g:i a",@vc["transferdate"])."</td></tr>";
echo "<tr><td>Tags:</td><td>".@vc["tag"]."</td></tr>";
echo "</table>";
echo @content[0];
} else {
echo "Sorry, it appears that is not a va"."lid Item Transfer Code.<br>";
echo @content[0];
}
} else {
//echo the html, it is not shown by default
echo @content[0];
}
if(isset(@input['submit']))//check that button was clicked
{
@vc= mds_is_itc(@input['ctc0']);
if (@vc) {
echo "<table border=1>";
echo "<tr><td>Item Name:</td><td>".@vc["name"]."</td></tr>";
echo "<tr><td>Item ID:</td><td>".@vc["id"]."</td></tr>";
echo "<tr><td>Owner ID:</td><td>".@vc["uid"]."</td></tr>";
echo "<tr><td>Created:</td><td>".date("F j, Y, g:i a",@vc["creationdate"])."</td></tr>";
echo "<tr><td>Last Transfer:</td><td>".date("F j, Y, g:i a",@vc["transferdate"])."</td></tr>";
echo "<tr><td>Tags:</td><td>".@vc["tag"]."</td></tr>";
echo "</table>";
echo @content[0];
} else {
echo "Sorry, it appears that is not a va"."lid Item Transfer Code.<br>";
echo @content[0];
}
} else {
//echo the html, it is not shown by default
echo @content[0];
} <form method="post" action="">
Enter an ITC to check<br />
<input name="ctc0" type="text" /><br />
<br />
<input name="submit" type="submit" value="Submit"/><br />
<br />
<font size="1px">*Copy from "ITC" to "MDI", not the entire code</font>
</form>