Om direct te kunnen linken naar de streams van radiodigitaal.nl (voor gebruik in MediaPortal), heb ik het volgende script gevonden:
Dit scriptje maakt contact met de radiodigitaal server, en haalt de link op voor de gevraagde stream. Het probleem is dat er nu alleen de low-stream gestart wordt (64kb). Er is ook een high-stream (128kb) beschikbaar en die kan aangeroepen worden als in de link die opgevraagd wordt 'LQ' wordt aangepast in 'HQ'.PHP Code:
<?php
if (isset($_REQUEST['station'])) {
if (!preg_match("/^[a-zA-Z0-9\/]*$/",$_REQUEST['station'])) exit;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://www.radiodigitaal.nl/");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$sec_challenge = '';
preg_match('/sec_challenge", "([0-9a-f]*)"/', curl_exec($ch), $matches);
$sec_challenge = $matches[1];
curl_setopt($ch, CURLOPT_URL, "http://www.radiodigitaal.nl/frame/registreer/inloggen");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "action=login&form_email=radiodigitaal@mytrashmail.com&form_password=bugbugbug&form_rememberme=on");
if (curl_exec($ch) == "1") {
echo "blocked by radiodigitaal :-(";
exit;
}
list($usec, $sec) = explode(" ",microtime());
curl_setopt($ch, CURLOPT_POST, 0);
curl_setopt($ch, CURLOPT_URL, "http://www.radiodigitaal.nl/frame/asx/".$_REQUEST['station']."/".$_REQUEST['station'].".asx?response=".base64_encode($sec.':'.$sec_challenge));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 0);
header("Content-Type: video/x-ms-asf");
curl_exec($ch);
} else {
?><html>
<head>
<title>Radio Digitaal without Flash!<title>
</head>
<body><p>I've created this page because Radio Digitaal only works with Windows Mediaplayer (without a good reason).
<p>Using the URLs below you can listen to the streams hosted on radiodigitaal.nl from all platsforms capable of playing WMA v2. For example <a href="http://www.mplayerhq.hu">MPlayer<a>.
<ul>
<li><a href="?station=247dance">24/7 Dance</a>
<li><a href="?station=nonstop40">Nonstop 40</a>
<li><a href="?station=powerfm">Power FM</a>
<li><a href="?station=loveradio">Love Radio</a>
<li><a href="?station=flashbackradio">Flashback Radio</a>
<li><a href="?station=jfk">JFK</a>
<li><a href="?station=realrockradio">Real Rock Radio</a>
<li><a href="?station=hits4kids">Hits 4 Kids</a>
</ul>
</body>
</html><?
}
?>
Ik heb vanalles geprobeerd, maar krijg het niet voor elkaar om de HQ stream werkend te krijgen. Als jij me hiermee kan helpen, dan graag! En post de code maar hier, dan hebben radio-website eigenaren er misschien ook iets aan.
Alvast bedankt!
- Radiodigitaal.nl
-
19-07-2008, 14:21 #1
- Berichten
- 132
- Lid sinds
- 17 Jaar
Radiodigitaal.nl
-
In de schijnwerper
Prijsperkwh.nl - met content & affiliate kansenWebsite te koopOntvang tot 20% kickbackfee op je Google Ads klanten, waar wacht je nog op?PromotieLinkvada.com Linkbuilding Platform: Direct Linkbuilden op 77.000+ premium domeinenLinkpartnersAffiliate link poster V1.0 - Automatisch affiliate links posten in blogs - WP pluginPHP scripts
Plaats een
- + Advertentie
- + Onderwerp
Marktplaats
Webmasterforum
- Websites algemeen
- Sitechecks
- Marketing
- Domeinen algemeen
- Waardebepaling
- CMS
- Wordpress
- Joomla
- Magento
- Google algemeen
- SEO
- Analytics
- Adsense
- Adwords
- HTML / XHTML
- CSS
- Programmeren
- PHP
- Javascript
- JQuery
- MySQL
- Ondernemen algemeen
- Belastingen
- Juridisch
- Grafisch ontwerp
- Hosting Algemeen
- Hardware Info
- Offtopic