Folks-
I've created a freeware native Win32 module for controlling v1.x and v2.x of Nullsoft's WinAMP Multimedia Player using the PHP programming language. It is currently beta-level software and I'm looking for willing beta testers to play with it and provide feedback. The module was compiled for PHP v4.1.1 but it may work with other 4.1.x PHP versions as well.
The binary (php_winamp.dll) and associated documentation (README.txt) can be downloaded from http://www.magpcss.com/~marshall/php_winamp.zip. The documentation alone can be downloaded from http://www.magpcss.com/~marshall/php_winamp.README.txt.
If anyone has questions, comments or suggestions related to this module you can contact me at the email address included with the above documentation, or, of course, post a message here :-) Thanks for the feedback, and have fun!
- Marshall
-------------------------------
A sample console application (written by Sean) using this module:PHP Code:<?php
If( !PHP_OS=='WIN32' ) {
Define( "cls", "[H[J" );
} Else {
Define( "cls", str_Repeat( Chr(10), 30 ) );
}
set_time_limit(0);
Function ShowMenu( $level ) {
Switch( $level ) {
Case "quit": Case "q": Return( False ); Break;
Case "prev": Case "z": winamp_play_previous(); Break;
Case "play": Case "x": winamp_play_start(); Break;
Case "pause": Case "c": winamp_pause_toggle(); Break;
Case "stop": Case "v": winamp_stop(); Break;
Case "next": Case "b": winamp_play_next(); Break;
}
$text = cls;
$text .= "Now Playing: " . winamp_play_title() . Chr(10);
$text .= "WinAMP v" . winamp_version() . Chr(10);
$text .= "Please Select An Option:\n";
$text .= "\tPrev ('z') - Play Previous Song\n";
$text .= "\tPlay ('x') - Begin Playback\n";
$text .= "\tPause ('c') - Pause Playback\n";
$text .= "\tStop ('v') - Stop Playback\n";
$text .= "\tNext ('b') - Play Next Song\n";
$text .= "\t<enter> - current song\n";
$text .= "'q' to quit\n>";
echo $text;
Return( True );
Break;
}
$stdin = fopen( "php://stdin", "r" );
ShowMenu("");
While( !feof( $stdin ) ) {
If( winamp_running() == False ) Die( "WinAMP is not running\n" );
$cmd = fgets( $stdin, 1024 );
If( strLen( $cmd ) > 0 ) {
$cmd = Trim( strToLower( $cmd ) );
$menu = ShowMenu( $cmd );
If( $menu == False ) Break;
}
}
fclose( $stdin );
?>




+ Celica = 


Bookmarks