AMIP - Advanced mIRC integration plug-in
 Web Integration
 Starting from version 2.35 AMIP supports /template and /exec commands, it is possible to put html with song info to your page via FTP or pass song info to php, perl, asp and other scripts running on your web server (for example to make image file with song information to use as a signature in the forums). This feature still requires some third-party tool like FTP, internal support for this will appear in the future AMIP versions. I recommend you to use cURL (http://curl.haxx.se/). cURL is a command line tool for transferring files with URL syntax, supporting FTP, FTPS, HTTP, HTTPS, GOPHER, TELNET, DICT, FILE and LDAP. Curl supports HTTPS certificates, HTTP POST, HTTP PUT, FTP uploading, kerberos, HTTP form based upload, proxies, cookies, user+password authentication, file transfer resume, http proxy tunneling and a busload of other useful tricks. This manual assumes that you are using cURL, so, go to the page and grab win32 version. It is recommended to use new AMIP Configurator from http://amip.tools-for.net/config/ since it has special Callbacks/Web presets where you can place commands. 1. Using AMIP to post the playing song information to your page via FTP First we need to create our HTML page template, I'll take very simple example:   My cool now-playing page

Now playing:

&func_lc(%name)

Album: %4
Year: %5
Genre: %7
Bitrate: %br
File size: %fl Mb
Create a directory, for example, C:\amipweb, create in.html in this directory, copy the above code into in.html. This will be the template. Of course, you can make a damn good page yourself, it's just an example. Put the downloaded and unpacked curl.exe into the same C:\amipweb directory. Now let's set up AMIP options: make sure that IRC integration is enabled, actually we are not going to post anything to mIRC, but we need to use a preset. Choose any of the presets, make it active, put the following code in it: /template:(c:\amipweb\in.html)c:\amipweb\out.html /exec:(c:\amipweb\curl.exe)-B -T out.html -u : ftp://// Correct the paths and put in your parameters. I'll explain the code: /template command takes the file in the parenthesis (our HTML template file), replaces all the variables, functions, conditional statements, etc and creates the page with song information written in c:\amipweb\out.html file. /exec command executes the application in the parenthesis and passes all the rest string to this application. So, all the rest lines consists of cURL arguments. -B tells cURL that we are transferring ascii file; -T out.htm tells cURL which file to upload to the FTP, you don't need to specify the directory in this case, because AMIP's /exec command automatically uses the working directory of the executed application (c:\amipweb\); -u : specifies the user name and password to access your FTP server (for example -u mylogin:mypassword); The last argument is the URL where to put the file. For example ftp://ftp.yourisp.com/web/. Note the trailing slash, it is required and represents the directory. BTW, you can upload the file with a different name, for example ftp://ftp.yourisp.com/web/nowplaying.html will upload our out.html file with nowplaying.html name. If you've done all the things right, on every song change the file will be updated on your FTP and everyone will be able to see what you listening to on your web page. If you are behind the proxy, it is not the problem! Read cURL manual and add the appropriate parameters to the /exec command in AMIP options.   2. Passing song information to the script (using cURL and PHP) I think that you've already got the idea after reading the first section. The difference is that we need to pass the variables to the php script. cURL supports GET and POST methods for passing variables to the scripts. Here is what you can put to the AMIP's preset (one line): /exec:(c:\amipweb\curl.exe) -G -d "title=&func_ue(%name)&album=&func_ue(%4)&bitrate=&func_ue(%br)&action=save" http://URL/np.php Actually, it is very simple: -G stands for the HTTP GET, remove it to use HTTP POST method. -d is followed by the list of arguments in the "key=value" form separated by & character. AMIP's function &func_ue (URL encode) encodes the variables passed to the script. Instead of using & separator, you can define several -d arguments: -d "title=&func_ue(%name)" -d "album=&func_ue(%4)" -d "bitrate=&func_ue(%br)" -d "action=save" The last -d parameter will tell our sample script that we need to save this info. If the np.php script is called without any parameters, it will show the last played song info. Don't forget to specify the URL of the np.php script in the end of /exec command. Here is the sample np.php script: Save the variables of the latest song to the npvars.txt if(isset($_REQUEST['action']) &&$_REQUEST['action'] == 'save'){   $fp = @fopen("./npvars.txt", "w+"); # File opened if($fp){     foreach($_REQUEST as$key=>$value){ fputs($fp, "$key=$value\n");     }     fclose($fp); # Display error } else { print("Cannot open file to save variables!"); } # If no action is specified, show the info for the latest track } else {$SONG = array();   $vars = file("npvars.txt"); foreach($vars as $line){$line = rtrim($line); list($key, $val) = split("=",$line);     $SONG[$key] = $val; } # Something was already saved? if(count($SONG) > 1){     # Here you can do with the $SONG variables whatever you like, I'll just show some of them in the plain text print("Playing song:$SONG[title]
");     print("Album: $SONG[album] "); print("Bitrate:$SONG[bitrate]