| | #1 |
| New Warrior Member Join Date: 2014
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
|
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 |
| |
| | #2 |
| Warrior Member War Room Member Join Date: 2012 Location: The Netherlands
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
|
Did you fix it already? If not send me an pm. with the page and the links to the video and image. |
| |
| | #3 |
| Warrior Member Join Date: 2014
Posts: 11
Thanks: 0
Thanked 3 Times in 3 Posts
|
You shouldn't be doing it this way. Avoid "eval" wherever you can.
|
| | |
| |
| | #4 |
| Warrior Member Join Date: 2013
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
|
You should try this class"PHP Simple HTML DOM Parser". You can download it from here: PHP Simple HTML DOM Parser |
| |
| | #5 |
| Web Programmer & Internet Join Date: 2013 Location: Faisalabad, Pakistan
Posts: 134
Thanks: 1
Thanked 7 Times in 7 Posts
|
Hi, I can help you. Please contact me if you still need some help. Thanks |
| | |
| |
|
| Bookmarks |
| Tags |
| code, javascript |
| Thread Tools | Search this Thread |
| |