Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
An API for PMOG using PHP4. Using this library one should be able to make their web server/site communicate with PMOG.
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
ReadMe.txt
dom4to5.php
example.php
json.php
pmog-api.old
pmog-api.php
securelogin.php

ReadMe.txt

PMOG PHP4 API v2.3
-----------------------------
Author: Stephen Kraushaar
Email: skraushaar@gmail.com
12:56 PM 7/31/2010


This API was created to allow a web server to act as a user on TheNethernet.

Changes
-----------------------------
v2.3

Updated for restored server changes. This API runs the casino, so as far as I can tell, fully functional.
However, this project is no longer maintained since I took on Nova Initia. 

v2.2
Using Login() is no longer necessary, the API will log in automatically if it does not have HudData.

No creation of silly arrays anymore. All commands should be straight forward, see example.php for examples.



Installation:
-----------------------------
Open securelogin.php and enter the appropriate login credentials.

Copy securelogin.php, pmog-api.php, and json.php to your server.

File example.php is a short example on how to stash a crate, along with a way to show HudData.


Basics:
-----------------------------

The following includes should be on every page you plan to use the API on:

require_once("pmog-api.php");


Available Functions:

!!!IMPORTANT THIS FUNCTION HAS CHANGED!!!!
StashCrate(string $url, int $dp, int $pings, string $comment, int $armor, int $crates, int $lightposts, int $mines, int $portals, int $nicks, $skeleton_keys, int $grenades, int $watchdogs, bool $explode, bool $lock)

Stash a crate. Locked crates not yet implemented.

LootCrate(string $url)
Loot the first crate on $url.

StashDPCard(string $url)
Stash a DP Card

LootDPCard(string $url)
Loot the first DP Card on $url.

SetMine(string $url)
Deploy a mine

SetWatchDog(string $url)
Unleash a Watch Dog

DrawPortal(string $portaltitle, string $portalurl, string $destination, bool $nsfw, bool $abundant)
Draw a portal

TrackURL(string $url)
Visit Url. This triggers tool events and awards DP.

SendMail(string $recipient, string $message)
Send a PMail, no '@' needed.

SetPlayerTag(string $playername, string $tag)
Set a tag on a player's profile

GetFlash()
Returns 'Flash' message returned from PMOG.
Strings such as "Crate Stashed!" and most server Error messages





GetEvents()
Returns an array containing user events/pmail


GetProfile(string $playername)
Returns a HudData-like Array object containing the requested player's profile


ToDo Next Release
-----------------------------
Give friendlier interface to HudData
Something went wrong with that request. Please try again.