|
|
|
|
![]() ![]() |
Jul 11 2008, 08:21 PM
Post
#1
|
|
|
Member [ Level 1 ] Group: [HOSTED] Posts: 36 Joined: 28-August 07 Member No.: 24,433 |
I was trying to make a php script that can view myspace videos with jw flv player and wont to know how to do so if i put in "http://vids.myspace.com/index.cfm?fuseaction=vids.individual&videoid=38105626" it show the video "http://cache01-videos02.myspacecdn.com/11/vid_e382054c036835500bacfef1ebb5157e.flv(its the flv video file from myspacetv), I cant see the similarity with the links please help, thanks for viewing this topic
This post has been edited by Normano: Jul 11 2008, 08:22 PM |
|
|
|
Jul 12 2008, 11:53 AM
Post
#2
|
|
|
Premium Member Group: Members Posts: 489 Joined: 29-September 06 Member No.: 16,228 |
Use file/_get_contents and look for the applet/object.
|
|
|
|
Jul 13 2008, 07:32 PM
Post
#3
|
|
|
Member [ Level 1 ] Group: [HOSTED] Posts: 36 Joined: 28-August 07 Member No.: 24,433 |
I found this script for veoh but dont understand all-.-
CODE <?php //Use veoh_filegrabber.php?video_url=http://www.veoh.com/videos/v1288822HBz3r9De $video_url = (isset($_GET["video_url"])) ? strval($_GET["video_url"]) : "http://www.veoh.com/videos/v1288822HBz3r9De"; getFlv($video_url); function getFlv($video_url) { preg_match('/http:\/\/www.veoh.com\/videos\/(.*)/', $video_url, $match); $details_url = 'http://www.veoh.com/rest/video/' . $match[1] . '/details'; if ($details = file("$details_url")) { foreach($details as $value) { // fullPreviewHashPath="http://content.veoh.com/flash/p/1288822/77c44b0448a3602f79d059c8e91e556ebf9e1b13.flv?ct=bf1913ed8788db2c804b5961e62ad111906735f5ca8e489c" if(preg_match('/fullPreviewHashPath=\"(.*?)\"/', $value, $match)) { $url = $match[1]; } } header('Location: ' . $url); } } ?> But its for veoh not for myspacetv and they using .htaccess hotlinking portection so i dont think i can use it:/ |
|
|
|
Jul 13 2008, 08:29 PM
Post
#4
|
|
|
Premium Member Group: Members Posts: 489 Joined: 29-September 06 Member No.: 16,228 |
Yeah, but you need to make your own for myspace.
|
|
|
|
Jul 13 2008, 08:50 PM
Post
#5
|
|
|
Member [ Level 1 ] Group: [HOSTED] Posts: 36 Joined: 28-August 07 Member No.: 24,433 |
i got a script for myspace here
CODE <?php but one problem is that it only work when i use it at my localhost(computer) and not at my website $url='http://mediaservices.myspace.com/services/rss.ashx?type=video&mediaID='.$_GET['video'];; if ($details = file("$url")) { foreach($details as $value) { if(preg_match('/url=\"(.*?)\"/', $value, $match)) { $myspace = $match[1]; } } header("Location: $myspace"); } ?> do i need php setting fopen? edit:do astahost allow fopen and .htaccess? This post has been edited by Normano: Jul 13 2008, 09:01 PM |
|
|
|
Jul 13 2008, 09:11 PM
Post
#6
|
|
|
Premium Member Group: Members Posts: 489 Joined: 29-September 06 Member No.: 16,228 |
They do. I don't know much php, but that doesn't look right. A var isn't a string, so you don't need "". The foreach is going through the pages, of which there is one. And it'll make the browser go to the flv, it might be neater to provide a link, as it would be downloaded.
|
|
|
|
Jul 13 2008, 09:49 PM
Post
#7
|
|
|
Member [ Level 1 ] Group: [HOSTED] Posts: 36 Joined: 28-August 07 Member No.: 24,433 |
when i go to "example.php?video=38105626" i get the flv file from the video with 38105626 as id, it was that i was searching for, thanks for all help, if u had not said "file/_get_content" i never search for it and found this, hope u understand my bad english :S
|
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 8th September 2008 - 02:55 AM |