I need Help with some javascript code

Status
Not open for further replies.

ayoub-hs

Active Member
37
2013
5
0
Hi, I managed to get a video url from other page but I need to load that video with jwplayer.
Here is where I got.
Code:
<html>
<head>
</head>
<body>
 <?php
 include ('functions.php');
  $scraped_page = curl("http://somepage.com");    
    $scraped_data = scrape_between($scraped_page, "eval", "</script>");   
    echo '<div id="packed" style="visibility:hidden;">';
    echo 'eval'.$scraped_data;
    echo '</div>';    
?>
<script language="javascript" type="text/javascript">
var coded = document.getElementById('packed').innerHTML;
var code;
eval("var value=String" + coded.slice(4));
code = value;
var vidurl = code.substr(156,90);
var imgurl = code.substr(270,51);
</script> 
</body>
</html>

I need to pass to jwplayer the vidurl as the video and imgurl as thumbnail

__________________
Added after 5 Hours 50 minutes:

Please Close this I found the solution

Found a solution. Close this
 
Last edited:
1 comment
Status
Not open for further replies.
Back
Top