Register Advertise with usHelp Desk Today's Posts Search

Closed Thread
Thread Tools Search this Thread
Unread 17th Nov 2014, 07:41 AM   #1
New Warrior Member
 
tarunap's Avatar
 
Join Date: 2014
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default
I need Help with some javascript code
Share on: 
fb share twitter share gplus share more share

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
tarunap is offline  
Unread 17th Nov 2014, 09:35 AM   #2
Warrior Member
War Room Member
 
Join Date: 2012
Location: The Netherlands
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default
Re: I need Help with some javascript code
Share on: 
fb share twitter share gplus share more share

Did you fix it already?

If not send me an pm. with the page and the links to the video and image.
Mrmoon75 is offline  
Unread 18th Nov 2014, 01:14 PM   #3
Warrior Member
 
Join Date: 2014
Posts: 11
Thanks: 0
Thanked 3 Times in 3 Posts
Default
Re: I need Help with some javascript code
Share on: 
fb share twitter share gplus share more share

You shouldn't be doing it this way. Avoid "eval" wherever you can.

http://premiumwebtechnologies.com

Affordable, Wordpress plugins & Web Applications
premiumwebtechnologies is offline  
Unread 28th Nov 2014, 03:24 AM   #4
Warrior Member
 
Join Date: 2013
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default
Re: I need Help with some javascript code
Share on: 
fb share twitter share gplus share more share

You should try this class"PHP Simple HTML DOM Parser".
You can download it from here: PHP Simple HTML DOM Parser
briannn is offline  
Unread 29th Nov 2014, 02:17 AM   #5
Web Programmer & Internet
 
Join Date: 2013
Location: Faisalabad, Pakistan
Posts: 134
Thanks: 1
Thanked 7 Times in 7 Posts
Default
Re: I need Help with some javascript code
Share on: 
fb share twitter share gplus share more share

Hi,

I can help you. Please contact me if you still need some help.
Thanks

azhar is offline  
Closed Thread


Bookmarks

Tags
code, javascript


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -6. The time now is 07:00 AM.