You are here

function pmpapi_url_is_mp3 in Public Media Platform API Integration 7

Determines if a URL seems like an MP3

Parameters

$url: A url pointing to the file

Return value

bool TRUE if path seems to point to an M3U, FALSE otherwise

1 call to pmpapi_url_is_mp3()
pmpapi_get_mp3_from_m3u in ./pmpapi.module
Attempts to crack an M3U and find first link to an MP3

File

./pmpapi.module, line 657
Creates basic calls to the PMP API.

Code

function pmpapi_url_is_mp3($url) {
  $pieces = drupal_parse_url($url);
  return substr($pieces['path'], -4) === '.mp3';
}