help me use block this script in kodular
<script src="http://scripts.myradiostream.com/s30/30382/song.js"></script>
or
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "s30.myradiostream.com:30382/7.html");
curl_setopt($ch,CURLOPT_USERAGENT,'Mozilla');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
$data = curl_exec($ch);
curl_close($ch);
$data = str_replace('', "", $data);
$split = explode(',', $data);
if (empty($split[6])) {
$title = "The current song is not available ";
} else {
$count = count($split);
$i = "6";
while($i<=$count) {
if ($i > 6) {
$title .= "," . $split[$i];
} else {
$title .= $split[$i];
}
$i++;
}
}
$title = substr($title, 0, -1);
echo $title;
?>
Alapjeet
(Alapjeet Singh)
February 16, 2020, 4:28am
#2
Why you want to use that script…
I mean purpose of using that script?
@dumaisemenanjungtv
Is this how you use the block?
that not show …
1 Like
Alapjeet
(Alapjeet Singh)
February 16, 2020, 5:31am
#4
This is the json i think…
1 Like
You can use evaluate js block available in webviever blocks and and just put script in it.
3 Likes
dumaisemenanjungtv:
For this you simply goto url in webviever from this src
1 Like
dumaisemenanjungtv:
<?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "s30.myradiostream.com:30382/7.html"); curl_setopt($ch,CURLOPT_USERAGENT,'Mozilla'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5); $data = curl_exec($ch); curl_close($ch); $data = str_replace('', "", $data); $split = explode(',', $data); if (empty($split[6])) { $title = "The current song is not available "; } else { $count = count($split); $i = "6"; while($i<=$count) { if ($i > 6) { $title .= "," . $split[$i]; } else { $title .= $split[$i]; } $i++; } } $
And for php this is server side scripting
1 Like
yusufcihan
(Yusuf Cihan)
February 16, 2020, 7:47am
#8
You can load it to WebViewer by instering a HTML file to assets or use Evaluate JS block to execute JavaScript for adding piece of HTML to the current page.
1 Like