Jump to content
View in the app

A better way to browse. Learn more.

Portal do Host

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Dica - capa de album via last.fm + brinde

Featured Replies

Vi que muitos aqui estão querendo algo do tipo, então vou fazer um tutorial básico. Vale lembra que vc precisa de gerar sua key no Last.FM.

1. Vamos lá, crie um arquivo php qualquer e adicione as seguinte linha para que sua pagina não gere cache, isso é importante para o reload (caso vc for usar):

header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");

2. Agora vamos a api:

// Last.fm
$artista = 'Adele'; //informe uma artista
$musica = 'Hello'; //informe uma música pertencente ao artista informado
$api_lastfm = 'sua_key_api'; //aqui o codigo da api key que vc deve gerar no Last.FM
$album = simplexml_load_file('http://ws.audioscrobbler.com/2.0/?method=track.getInfo&lang=pt&api_key='.$api_lastfm.'&artist='.$artista.'&track='.$musica);
$artist = simplexml_load_file('http://ws.audioscrobbler.com/2.0/?method=artist.getinfo&lang=pt&artist='.$artista.'&api_key='.$api_lastfm);

3. Veja que criei acima duas string uma para álbum e outra para artista, isso é para caso queira exibir as informações do artista e álbum. Veja uma exemplo:

echo $artist->artist[0]->image[3]; //vai exibir uma imagem do artista
echo $album->track[0]->album[0]->image[3]; //vai exibir a capa do album
echo $artist->artist[0]->bio[0]->content[0]; //vai exibir uma biografia completa do artista

Veja que é simples, no caso acima eu só mencionei um breve código para ser usado.

Para gerar sua API Key do Last.FM é só seguir os passo de http://www.last.fm/api/authspec

Espero ter ajudado, e boa sorte em vossos trabalhos.

Referências:

http://www.last.fm/api/show/track.getInfo

http://www.last.fm/api/show/artist.getinfo


como usar so a capa do album?

precisava terminar um projeto e preciso das capas do album uso shoutcast queria saber como terminar esta linha

public static String ARTIST = "ttps://player.srvstm.com/img/img-capa-artista-padrao.png";
public static String ALBUM = "ttps://player.srvstm.com/img/img-capa-artista-padrao.png";
public static String LAST_FM_KEY_NEW = "34ab792170a43227d81525afef9874a0";
public static String IMAGE = "ttps://player.srvstm.com/img/img-capa-artista-padrao.png";
public static final long  REQUIRED_TIME = 1000;
public static boolean time = false;

 

já tenho a chave do last fm mais não sei como fazer para deixar isso funcional se uso json ou xml  qual uso?

JSON: /2.0/?method=artist.search&artist=cher&api_key=YOUR_API_KEY&format=json
XML: /2.0/?method=artist.search&artist=cher&api_key=YOUR_API_KEY

qual destas urls usar?

http://ws.audioscrobbler.com/2.0/?method=artist.search&artist=cher&api_key=YOUR_API_KEY&format=json

http://ws.audioscrobbler.com/2.0/?method=artist.search&artist=cher&api_key=YOUR_API_KEY

tem algum outro modo de fazer capa do album tipo usando shoutcast server?


  • Author
Em 21/01/2020 em 14:08, wmorj disse:

como usar so a capa do album?

precisava terminar um projeto e preciso das capas do album uso shoutcast queria saber como terminar esta linha


public static String ARTIST = "ttps://player.srvstm.com/img/img-capa-artista-padrao.png";
public static String ALBUM = "ttps://player.srvstm.com/img/img-capa-artista-padrao.png";
public static String LAST_FM_KEY_NEW = "34ab792170a43227d81525afef9874a0";
public static String IMAGE = "ttps://player.srvstm.com/img/img-capa-artista-padrao.png";
public static final long  REQUIRED_TIME = 1000;
public static boolean time = false;

 

já tenho a chave do last fm mais não sei como fazer para deixar isso funcional se uso json ou xml  qual uso?

JSON: /2.0/?method=artist.search&artist=cher&api_key=YOUR_API_KEY&format=json
XML: /2.0/?method=artist.search&artist=cher&api_key=YOUR_API_KEY

qual destas urls usar?

http://ws.audioscrobbler.com/2.0/?method=artist.search&artist=cher&api_key=YOUR_API_KEY&format=json

http://ws.audioscrobbler.com/2.0/?method=artist.search&artist=cher&api_key=YOUR_API_KEY

tem algum outro modo de fazer capa do album tipo usando shoutcast server?

Leia o tópico direito, tá especificado como funciona. Comentei cada variável.


Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Recently Browsing 0

  • No registered users viewing this page.

Important Information

Do you agree with our terms?

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.