Not logged in. · Lost password · Register
Forum: Features request RSS
Browsamp Whit Php (apache)
write sites in PHP
Avatar
fabiopigi #1
Member since Jul 2003 · 11 posts
Group memberships: Members
Show profile · Link to this post
i think it shoud be possible to write the pages in PHP.

sure, only if you have installed the Apache server, with the PHP module, end the MySQL.

so you could programm much better interfaces:
-custom the interface (color, fontsize/face, lenght of playlist)
-make a top10 playlist
-add comment to each song
-upload your own files
-you could make a searchenegie for the playlist,

and much more.

or you could build the equalizer with gdLIB.

PS:
i've got a equalizer
look at skins, and then CliéAmp 2.0
Avatar
Henry (Administrator) #2
Member since Jan 2003 · 865 posts · Location: Munich Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Ok, just do it!

You need Apache (or whatever) with PHP and Winamp/BrowseAmp running on an other port. Request the BrowseAmp pages with CURL functions (readfile does NOT work properly) in php, tune the data and serve them to the client.
You could use some simple ini-file or XML like templates to get the playlist/browser data to make parsing easier with PHP.

I'm looking forward for your attempts.
Avatar
fabiopigi #3
Member since Jul 2003 · 11 posts
Group memberships: Members
Show profile · Link to this post
hi


ok, im back


but can you explain this better for me???
what parameter do i need, and in which form i'll recive them??
nick #4
Member since Sep 2003 · 1 post
Group memberships: Members
Show profile · Link to this post
Okey Kids!

I have red all and i wanna make my own PHP interface, i am beginner (in PHP and other programing), nut i wanna try something great, so how do i gather info from the plugin?
Avatar
Henry (Administrator) #5
Member since Jan 2003 · 865 posts · Location: Munich Germany
Group memberships: Administrators, Members
Show profile · Link to this post
To gather information from BrowseAmp you have to read/interpret the generated output that is normally sent to the client browser. In your case you have to act as a normal client that requests data from BrowseAmp. There is no way to read info directly from the plug-in.

The major problem here is to parse the information from the received file. That's why you have to create an easy-to-parse skin. But don't worry, php comes with some good string/array functions that should make this not too difficult.

Maybe I'll create a simple php wrapper for BrowseAmp from where php skin devs can start.

Hey, I found a code snipped from my attemps to create a php wrapper! Hope that helps.
<?php

//phpinfo();

$ch = curl_init ("http://localhost:81/playlist.html");

curl_setopt ($ch, CURLOPT_FILE, $fp);
curl_setopt ($ch, CURLOPT_HEADER, 0);

curl_exec ($ch);  // read data into $fp
curl_close ($ch);

?>
Avatar
Henry (Administrator) #6
Member since Jan 2003 · 865 posts · Location: Munich Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Here is some sample code I've just written. It's really lame, gets no information from BrowseAmp yet but should be a good point to start from. Save this code as index.php in your htdocs and configure BrowseAmp to run at port 81.
<?php

//phpinfo();

$get = "?";
foreach ($HTTP_GET_VARS as $key => $var)
    {
    if(strlen($var)) $get .= $key."=".$var."&";
    else $get .= $key."&";
    }

$ch = curl_init ("http://localhost:81/index.html".$get);
$fp = fopen ("result.ini", "w");

curl_setopt ($ch, CURLOPT_FILE, $fp);
curl_setopt ($ch, CURLOPT_HEADER, 0);

curl_exec ($ch);
curl_close ($ch);
fclose ($fp);

?>


<html>
<head>
<title>simple BrowseAmp php-wrapper</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>


<body text="#FFFF00" bgcolor="#000033" link="#CCCCCC" vlink="#CCCCCC" alink="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<center>
<p> </p>
<p> </p>
<p> </p>
<p>
    <table width="560" border="0" cellspacing="0" cellpadding="0">
      <tr align="center">
        <td> <a href="?prev">prev</a></td>
        <td> <a href="?play">play</a></td>
        <td> <a href="?stop">stop</a></td>
        <td> <a href="?pause">pause</a></td>
        <td> <a href="?next">next</a></td>
      </tr>
    </table>
</p>
</center>
</body>
</html>
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Page created in 196.4 ms (116.6 ms) · 64 database queries in 103.7 ms
Current time: 2018-07-16, 06:42:30 (UTC +00:00)