WACSip

Web-based Adult Content Server

A PHP interface for WACS

Differences Between Perl and PHP API

Core Wacs Modules (wacs.php)

gettoday

Passing of artibitary named parameters isn't quite as easy to achieve in PHP as it is in perl, but it is arguably a little clearer if you're not used to it. At it's simplest, gettoday is used without parameters and then the calls are essentially identical. It does however take three optional parameters: format - to explicitly set the date format, offset - to give a date relative to today, and epoch - to base it on a supplied Unix "epoch" style date. In Php we build an array with named element indexes and pass it instead - below are some examples of this:
Simple:       $today = $wacs->gettoday();
Yesterday:    $yesterday = $wacs->gettoday( array(
			"offset"=>"1" ));
In Oracle Format:  $ora_fmt = $wacs->gettoday( array(
			"format"=>"DD-MON-YYYY" ));
Yesterday in Oracle: $ora_yest = $wacs->gettoday( array(
			"format"=>"DD-MON-YYYY",
			"offset"=>"1" ));

timecomps

Since PHP can't cope with a return of an implicit packed array, the timecomps call returns an array instead. The first parameter (0) is the day of the month, the second (1) is the month number, and the third (0) is the year. An example:
$return = array();
$return = $wacs->timecomps("2007-03-27","YYYY-MM-DD");
print "parts:  day ".$return[0]." month ".$return[1]." year ".$return[2]."\n";

User Interface Modules (wacsui.php)

describeher

As with gettoday, describeher requires a dynamically created array to be passed as PHP cannot cope with arbitarily named parameters. See description above.

whatshedoes

As with gettoday, whatshedoes requires a dynamically created array to be passed as PHP cannot cope with arbitarily named parameters. See description above.

iconlink

As with gettoday, iconlink requires a dynamically created array to be passed as PHP cannot cope with arbitarily named parameters. See description above.
Back to Wacs-PHP documentation