mds_is_itc
mds_is_itc - Gets information about the item corresponding to the transfer code.
Description
array mds_is_itc(string $itc)
Gets information about the item corresponding to the transfer code.
Parameters
- itc
- The string containing a item transfer code to evaluate.
Never use the full ITC string or it will be treated as invalid and return false.
Return Values
Returns False if invalid ITC is supplied,
otherwise it returns an array with item information.
The return array is in this form:
- array(){
- ["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
- ["transferdate"] => last transfer date
- ["tag"] => Tag ("tool", "Valuable", "enchanted, consumable", etc)
- }
Examples
example #1
@vc= mds_is_itc(@input['itc']);
if (@vc) {
echo "Item Name:".@vc["name"]."<br>";
echo "Item ID:".@vc["id"]."<br>";
echo "Owner ID:".@vc["uid"]."<br>";
echo "Owner Playername:".@vc["playername"]."<br>";
echo "Created:".date("F j, Y, g:i a",@vc["creationdate"])."<br>";
echo "Last Transfer:".date("F j, Y, g:i a",@vc["transferdate"])."<br>";
echo "Tags:".@vc["tag"]."<br>";
}
Community content is available under CC-BY-SA unless otherwise noted.