FAQ Search
EvilLyrics : Lyrics : How can i post current lyrics to my web page? Print

Can I post lyrics to my web page? Can I save them into a file?


You can now choose betweenüH-How can i post current lyrics to my web page?>Can I post lyrics to my web page? Can I save them into a file?marekr©ion. Beside this you can choose whether you want to save lyrics in the local file or post it to specified URL.

1. Saving current lyrics to a file

Lyrics are now saved to a file specified under Preferences > Advanced > Lyrics posting
If file is non existent or does not contain specific tags, whole contents of a file will be replaced by current lyrics.
If you only want to insert lyrics into existing file without removing it's original content, select the file you want and insert a tag <LYRICS> where you want to have lyrics and a tag <SONGTITLE> where you want to have artist's name and song title (as they appear in EL search bar, usually in the form "Artist - Song"). Every time new lyrics are displayed in EvilLyrics (or with manual posting every time you hit Post button) <LYRICS> tag is replaced by "<LYRICS>lyrics of the song played<LYRICS END>". Same applies to SONGTITLE. You can use any tag in your file, or both of them.

Note: in build 129 we introduced inserting of lyrics into AIM profile. This was removed because it didn't work properly. You can now use this feature to write in the AIM profile. Just locate file named info.htm that should be located somewhere like this:

Use this text:
c:Documents and Settings<windows user>Application DataAim<screen name>info.htm

insert a tag "<LYRICS>" where you want to have lyrics and copy this path to EvilLyrics "To file" settings.

2. Posting current lyrics to a URL

Lyrics can also be posted to a specified URL. You can use parameters %LYRICS and %SONGTITLE in your URL which are replaced with lyrics and song title itself when posting. URL can look like:

Use this text:

On server side you can then process the lyrics the way you want. You can for example insert them into your blog like i do. Here's an example how I do it (assuming your server is PHP enabled). If someone can come up with simpler way, please share.

On your server you have to create a file in which lyrics will be stored and which will be included in your page. You will write in this file using PHP script so this file has to have writing permission.

Lets create a file named lyrics.php and enable writing into this file (for example in cpanel you can do so in File Manager)

Now we will create a file which will process the lyrics and write them in the file we created. This will be file we will specify in EvilLyrics URL field.

File can be named bloglyrics.php and it's content can look like this:

Use this text:

if (isset($text)) {
$fp = fopen("blog/lyrics.php", 'w'); //path to lyrics.php file with writing permission
$out = str_replace('\','',$text); //we remove backslashes from lyrics
//$out = "<b>".str_replace('\','',$title)."</b><br>".$out;
//uncomment the line above if you want to include song title too

fwrite($fp, $out); //we will write lyrics into a file
//fwrite($fp, substr($out,0, 1000)); //or we can write only portion of the lyrics


If we picked variables $text and $title, we can then call this file using

Use this text:

url in "To URL" field in EvilLyrics. Every time lyrics are posted, they are written into file lyrics.php. Now what to do with this file? You can include it in any of your pages using

Use this text:
<? include('lyrics.php') ?>

you can for example insert it in your blog sidebar like I do. If you found some other way how to put the lyrics on your page or you succeeded to include it using this method, please let us know.

last updated 18.11.2004
user rating: 1.83 of 3.00, 1220 ratings
 How do you rate this article?   For questions please use the forum
:: EvilLyrics

Copyright© 2003-24

¿Cuándo es es Cuasimodo en 2019?