View Full Version : Exploding artist?
Dentafrice1
16-02-2007, 04:52 PM
Dawn of the Dude - Set Us Free
How can I explode that into just Dawn of the Dude?
Not just for that any band.. like
Kiss - Strutter
or Boys like girls - Dance hall drug?
I just tested this, it worked
<?php
$name = $_GET['name'];
$name = explode(" - ", $name);
echo $name[0];
?>
http://thomas.uk.to/name.php?name=The Fratellis - Henrietta (http://thomas.uk.to/name.php?name=The%20Fratellis%20-%20Henrietta)
timROGERS
16-02-2007, 04:58 PM
I see that you listened to what I said :P
Dentafrice1
16-02-2007, 05:08 PM
Done got it lol.
For normal radio stats include this in the page:
<?
$name = explode(" - ", $song[0]);
$artist = $name[0];
$url = "album.php?artist=$artist";
$url = eregi_replace(" ", "+", $url);
$thing = file_get_contents($url);
echo "<img src=$thing>";
?>
Save this as album.php:
<?php
header("Content-Type: image/gif");
$artist = $_GET['artist'];
$artist = urldecode($artist);
$url = "http://www.last.fm/music/" . $artist . "/";
$url = eregi_replace(" ", "+", $url);
$data = file_get_contents($url);
$image1start = explode('<div class="imgHolder">', $data);
$image1end = explode('</div>', $image1start[1]);
$image1 = trim($image1end[0]);
$imagestart = explode('<img src="', $image1);
$imageend = explode('" alt', $imagestart[1]);
$image = trim($imageend[0]);
echo $image;
?>
Dentafrice1
16-02-2007, 05:09 PM
http://www.skylightlobby.com/site/ - See it in action there.
Want to hide these adverts? Register an account for free!
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.