Enjoy an ad free experience by logging in. Not a member yet?
Register .
10-12-2012, 01:22 AM
PM User |
#511
New to the CF scene
Join Date: Oct 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Hello.
I have bought your script and I did everything according to the instructions.
But when I run it on server, I get this error:
Parse error: syntax error, unexpected T_FUNCTION in /home/xxx/public_html/index.php on line 174
I'm on a VPS with CentOS installed, ffmpeg installed and properly configured into the config class.
Can you somehow assist me with this?
Thanks.
10-12-2012, 02:30 AM
PM User |
#512
Senior Coder
Join Date: Dec 2004
Location: the U.S. of freakin' A.
Posts: 2,530
Thanks: 15
Thanked 128 Times in 121 Posts
Quote:
Originally Posted by
belveder
Hello.
I have bought your script and I did everything according to the instructions.
But when I run it on server, I get this error:
Parse error: syntax error, unexpected T_FUNCTION in /home/xxx/public_html/index.php on line 174
I'm on a VPS with CentOS installed, ffmpeg installed and properly configured into the config class.
Can you somehow assist me with this?
Thanks.
You are getting that error because anonymous functions are not available in PHP until version 5.3.
For that reason and several others, you need to be running at least PHP 5.3 in order for the app to function correctly.
Last edited by chump2877; 10-15-2012 at 10:42 AM ..
10-13-2012, 05:35 PM
PM User |
#513
New Coder
Join Date: Jan 2012
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Any ideas about my problem? How to resolve it ?
Thanks !
10-15-2012, 10:47 AM
PM User |
#514
Senior Coder
Join Date: Dec 2004
Location: the U.S. of freakin' A.
Posts: 2,530
Thanks: 15
Thanked 128 Times in 121 Posts
Quote:
Originally Posted by
atanas
Any ideas about my problem? How to resolve it ?
Thanks !
Your JSON is malformed. See the code in red in the test case below:
Code:
<?php
error_reporting(0);
function ExtractSongTrackName($vidSrc, $srcType)
{
$name = '';
$vidSrcTypes = array('source_code', 'url');
if (in_array($srcType, $vidSrcTypes))
{
$vidSrc = ($srcType == $vidSrcTypes[1]) ? file_get_contents($vidSrc) : $vidSrc;
if ($vidSrc !== false && eregi('eow-title',$vidSrc))
{
$name = end(explode('eow-title',$vidSrc));
$name = current(explode('">',$name));
$name = end(explode('title="', $name));
$name = iconv("UTF-8", "ISO-8859-1//TRANSLIT", $name);
$name = (!empty($name)) ? html_entity_decode($name) : 'unknown_'.time();
}
}
return $name;
}
function SetFlvUrls($file_contents)
{
$vidUrls = array();
if (preg_match('/(yt\.playerConfig =)([^\r\n]+)/', $file_contents, $matches) == 1)
{
$jsonObj = json_decode(trim($matches[2], ';') . '"}}');
if (isset($jsonObj->args->url_encoded_fmt_stream_map))
{
//die(print_r($jsonObj->args->url_encoded_fmt_stream_map));
$urls = urldecode(urldecode($jsonObj->args->url_encoded_fmt_stream_map));
$urlsArr = preg_split('/(itag=)(\d+)(&url=)/', $urls, -1, PREG_SPLIT_NO_EMPTY);
foreach ($urlsArr as $url)
{
if (preg_match('/quality=small/',$url) != 1)
{
$url = preg_replace('/sig=/', "signature=", $url);
$url = trim($url, ',');
$url .= '&title=' . urlencode(ExtractSongTrackName($file_contents, 'source_code'));
$url = preg_replace_callback('/(&type=)(.+?)(&)/', function($match){return $match[1].urlencode($match[2]).$match[3];}, $url);
$vidUrls[] = $url;
}
}
$vidUrls = array_reverse($vidUrls);
//die(print_r($vidUrls));
}
}
return $vidUrls;
}
$file_contents = <<< 'END'
<!DOCTYPE html>
<html lang="bg" dir="ltr" >
<script>
if (window.yt.timing) {yt.timing.tick("js_head");} </script>
<script>
yt.setAjaxToken('subscription_ajax', "");
yt.pubsub.subscribe('init', yt.www.subscriptions.SubscriptionButton.init);
</script>
<script>
yt.setConfig({
'VIDEO_ID': "A6dP2vMxRHs" });
yt.setAjaxToken('watch_actions_ajax', "");
if (window['gYouTubePlayerReady']) {
yt.registerGlobal('gYouTubePlayerReady');
}
</script>
<script>
yt = yt || {};
yt.playerConfig = {"assets": {"css_actions": "http:\/\/s.ytimg.com\/yt\/cssbin\/www-player-actions-vflrtkTn7.css", "html": "\/html5_player_template", "css": "http:\/\/s.ytimg.com\/yt\/cssbin\/www-player-vflAP1Pz1.css", "js": "http:\/\/s.ytimg.com\/yt\/jsbin\/html5player-vfliqXF24.js"}, "url": "http:\/\/s.ytimg.com\/yt\/swfbin\/watch_as3-vfldzrQK1.swf", "min_version": "8.0.0", "args": {"fexp": "905705,901809,922401,920704,912806,927201,900711,913546,913556,925109,919003,912706,900816", "ptk": "youtube_multi", "shortform": true, "inactive_skippable_threshold": 600000, "allow_embed": 1, "iv_close_button": 0, "mpvid": "AATLoysW5LePoysG", "account_playback_token": "", "excluded_ads": "3=1_1,1_2,1_3,2_1,2_2,2_2_1,2_3", "csi_page_type": "watch5ad", "keywords": "Alex,Mica,Dalinda,Official,Video,radio,edit,senorita,mi corazon,romania,music,new,single,2012,constanta,fullhd,1ArtistMusic,1AM", "cr": "US", "ad3_module": "http:\/\/s.ytimg.com\/yt\/swfbin\/ad3-vfl_wT7C1.swf", "enablecsi": "1", "iv3_module": "http:\/\/s.ytimg.com\/yt\/swfbin\/iv3_module-vflG0Mme1.swf", "gut_tag": "\/4061\/ytpwmpu\/main_819911", "ad_flags": 0, "fmt_list": "46\/1920x1080\/99\/0\/0,37\/1920x1080\/9\/0\/115,45\/1280x720\/99\/0\/0,22\/1280x720\/9\/0\/115,44\/854x480\/99\/0\/0,35\/854x480\/9\/0\/115,43\/640x360\/99\/0\/0,34\/640x360\/9\/0\/115,18\/640x360\/9\/0\/115,5\/320x240\/7\/0\/0,36\/320x240\/99\/0\/0,17\/176x144\/99\/0\/0", "title": "Alex Mica - Dalinda (Official Video)", "length_seconds": 207, "loeid": "905705,901809", "enablejsapi": 1, "tk": "pIjMgvESjdXTc4T4qXNstFGm-fZJLSFYbft2Yi3_0vaqVh6lerXMww==", "plid": "AATLoysV_piYoXkY", "iv_module": "http:\/\/s.ytimg.com\/yt\/swfbin\/iv_module-vflMas-uM.swf", "watch_xlb": "http:\/\/s.ytimg.com\/yt\/xlbbin\/watch-strings-bg_BG-vflQuhAj_.xlb", "ad_tag": "http:\/\/ad-emea.doubleclick.net\/N4061\/pfadx\/com.ytpwmpu.entertainment\/main_819911;sz=WIDTHxHEIGHT;kvid=A6dP2vMxRHs;kpu=1artistmusic;kpid=819911;u=A6dP2vMxRHs|819911;mpvid=AATLoysW5LePoysG;plat=pc;kpeid=YM6H8mE3I8nTON-wMqg5Gg;afc=1;afct=content;dc_dedup=1;k5=3_12_35_36_211_592_612_613_1030_1115_1408;kclt=1;kcr=us;kga=-1;kgg=-1;klg=bg;ko=p;kr=A;kt=K;kvz=205;shortform=1;tves=0;ytcat=24;ytexp=905705.901809.922401.920704.912806.927201.900711.913546.913556.925109.919003.912706.900816;ytps=default;ytvt=w;!c=819911;k2=3;k2=12;k2=35;k2=36;k2=211;k2=592;k2=612;k2=613;k2=1030;k2=1115;k2=1408;", "ad_slots": "0", "url_encoded_fmt_stream_map": "itag=46\u0026url=http%3A%2F%2Fo-o---preferred---sn-x8vapo3-nv4e---v23---lscache6.c.youtube.com%2Fvideoplayback%3Fupn%3DBlgHS4N5zfQ%26sparams%3Dcp%252Cgcr%252Cid%252Cip%252Cipbits%252Citag%252Cratebypass%252Csource%252Cupn%252Cexpire%26fexp%3D905705%252C901809%252C922401%252C920704%252C912806%252C927201%252C900711%252C913546%252C913556%252C925109%252C919003%252C912706%252C900816%26ms%3Dau%26expire%3D1349823892%26itag%3D46%26ipbits%3D8%26gcr%3Dbg%26sver%3D3%26ratebypass%3Dyes%26source%3Dyoutube%26ip%3D91.196.127.143%26mv%3Du%26key%3Dyt1%26cp%3DU0hTTlhNUV9OTENOM19QR1VJOlpNYm0xQjhzR1gw%26id%3D03a74fdaf331447b\u0026type=video%2Fwebm%3B+codecs%3D%22vp8.0%2C+vorbis%22\u0026fallback_host=tc.v23.cache6.c.youtube.com\u0026sig=477A4C077A50BD04F6B21622D0D90699FABF6CFD.B484CE52444922B4C85011BAB41AA31A5B3E205C\u0026quality=hd1080,itag=37\u0026url=http%3A%2F%2Fo-o---preferred---sn-x8vapo3-nv4e---v9---lscache1.c.youtube.com%2Fvideoplayback%3Fupn%3DBlgHS4N5zfQ%26sparams%3Dcp%252Cgcr%252Cid%252Cip%252Cipbits%252Citag%252Cratebypass%252Csource%252Cupn%252Cexpire%26fexp%3D905705%252C901809%252C922401%252C920704%252C912806%252C927201%252C900711%252C913546%252C913556%252C925109%252C919003%252C912706%252C900816%26ms%3Dau%26expire%3D1349823892%26itag%3D37%26ipbits%3D8%26gcr%3Dbg%26sver%3D3%26ratebypass%3Dyes%26source%3Dyoutube%26ip%3D91.196.127.143%26mv%3Du%26key%3Dyt1%26cp%3DU0hTTlhNUV9OTENOM19QR1VJOlpNYm0xQjhzR1gw%26id%3D03a74fdaf331447b\u0026type=video%2Fmp4%3B+codecs%3D%22avc1.64001F%2C+mp4a.40.2%22\u0026fallback_host=tc.v9.cache1.c.youtube.com\u0026sig=6D30F8FB542DE6493F3639FA457F2E71EEEEBE0A.17A330CC06235F190D6A064F0D6F849432610E36\u0026quality=hd1080,itag=45\u0026url=http%3A%2F%2Fo-o---preferred---sn-x8vapo3-nv4e---v6---lscache7.c.youtube.com%2Fvideoplayback%3Fupn%3DBlgHS4N5zfQ%26sparams%3Dcp%252Cgcr%252Cid%252Cip%252Cipbits%252Citag%252Cratebypass%252Csource%252Cupn%252Cexpire%26fexp%3D905705%252C901809%252C922401%252C920704%252C912806%252C927201%252C900711%252C913546%252C913556%252C925109%252C919003%252C912706%252C900816%26ms%3Dau%26expire%3D1349823892%26itag%3D45%26ipbits%3D8%26gcr%3Dbg%26sver%3D3%26ratebypass%3Dyes%26source%3Dyoutube%26ip%3D91.196.127.143%26mv%3Du%26key%3Dyt1%26cp%3DU0hTTlhNUV9OTENOM19QR1VJOlpNYm0xQjhzR1gw%26id%3D03a74fdaf331447b\u0026type=video%2Fwebm%3B+codecs%3D%22vp8.0%2C+vorbis%22\u0026fallback_host=tc.v6.cache7.c.youtube.com\u0026sig=2F4A2C9EEB794598BA552F515F664B726979493A.2DE603CC1A89511CBCE31C9065EBCED663A28165\u0026quality=hd720,itag=22\u0026url=http%3A%2F%2Fo-o---preferred---sn-x8vapo3-nv4e---v6---lscache8.c.youtube.com%2Fvideoplayback%3Fupn%3DBlgHS4N5zfQ%26sparams%3Dcp%252Cgcr%252Cid%252Cip%252Cipbits%252Citag%252Cratebypass%252Csource%252Cupn%252Cexpire%26fexp%3D905705%252C901809%252C922401%252C920704%252C912806%252C927201%252C900711%252C913546%252C913556%252C925109%252C919003%252C912706%252C900816%26ms%3Dau%26expire%3D1349823892%26itag%3D22%26ipbits%3D8%26gcr%3Dbg%26sver%3D3%26ratebypass%3Dyes%26source%3Dyoutube%26ip%3D91.196.127.143%26mv%3Du%26key%3Dyt1%26cp%3DU0hTTlhNUV9OTENOM19QR1VJOlpNYm0xQjhzR1gw%26id%3D03a74fdaf331447b\u0026type=video%2Fmp4%3B+codecs%3D%22avc1.64001F%2C+mp4a.40.2%22\u0026fallback_host=tc.v6.cache8.c.youtube.com\u0026sig=2DE5BDA9307B76B4A41CBABE934AC9DEFE6A5522.830C59E4E2F2E62863C8ACF19C44352B1A92451B\u0026quality=hd720,itag=44\u0026url=http%3A%2F%2Fo-o---preferred---sn-x8vapo3-nv4e---v10---lscache2.c.youtube.com%2Fvideoplayback%3Fupn%3DBlgHS4N5zfQ%26sparams%3Dcp%252Cgcr%252Cid%252Cip%252Cipbits%252Citag%252Cratebypass%252Csource%252Cupn%252Cexpire%26fexp%3D905705%252C901809%252C922401%252C920704%252C912806%252C927201%252C900711%252C913546%252C913556%252C925109%252C919003%252C912706%252C900816%26ms%3Dau%26expire%3D1349823892%26itag%3D44%26ipbits%3D8%26gcr%3Dbg%26sver%3D3%26ratebypass%3Dyes%26source%3Dyoutube%26ip%3D91.196.127.143%26mv%3Du%26key%3Dyt1%26cp%3DU0hTTlhNUV9OTENOM19QR1VJOlpNYm0xQjhzR1gw%26id%3D03a74fdaf331447b\u0026type=video%2Fwebm%3B+codecs%3D%22vp8.0%2C+vorbis%22\u0026fallback_host=tc.v10.cache2.c.youtube.com\u0026sig=C3103E28837A4A049AD467C9F03EBD195D7BC888.8F273290C8F0531EE681726085EEB956B2F345DE\u0026quality=large,itag=35\u0026url=http%3A%2F%2Fo-o---preferred---sn-x8vapo3-nv4e---v5---lscache2.c.youtube.com%2Fvideoplayback%3Fupn%3DBlgHS4N5zfQ%26sparams%3Dalgorithm%252Cburst%252Ccp%252Cfactor%252Cgcr%252Cid%252Cip%252Cipbits%252Citag%252Csource%252Cupn%252Cexpire%26fexp%3D905705%252C901809%252C922401%252C920704%252C912806%252C927201%252C900711%252C913546%252C913556%252C925109%252C919003%252C912706%252C900816%26ms%3Dau%26algorithm%3Dthrottle-factor%26burst%3D40%26ip%3D91.196.127.143%26itag%3D35%26gcr%3Dbg%26sver%3D3%26source%3Dyoutube%26mv%3Du%26key%3Dyt1%26ipbits%3D8%26factor%3D1.25%26cp%3DU0hTTlhNUV9OTENOM19QR1VJOlpNYm0xQjhzR1gw%26expire%3D1349823892%26id%3D03a74fdaf331447b\u0026type=video%2Fx-flv\u0026fallback_host=tc.v5.cache2.c.youtube.com\u0026sig=52885DE5B4FDCB0ABF1DA5B6024D1DDA2452A51C.9BE5B0F8F9B968E5BBF76C7F3226B2B0C314CC30\u0026quality=large,itag=43\u0026url=http%3A%2F%2Fo-o---preferred---sn-x8vapo3-nv4e---v8---lscache6.c.youtube.com%2Fvideoplayback%3Fupn%3DBlgHS4N5zfQ%26sparams%3Dcp%252Cgcr%252Cid%252Cip%252Cipbits%252Citag%252Cratebypass%252Csource%252Cupn%252Cexpire%26fexp%3D905705%252C901809%252C922401%252C920704%252C912806%252C927201%252C900711%252C913546%252C913556%252C925109%252C919003%252C912706%252C900816%26ms%3Dau%26expire%3D1349823892%26itag%3D43%26ipbits%3D8%26gcr%3Dbg%26sver%3D3%26ratebypass%3Dyes%26source%3Dyoutube%26ip%3D91.196.127.143%26mv%3Du%26key%3Dyt1%26cp%3DU0hTTlhNUV9OTENOM19QR1VJOlpNYm0xQjhzR1gw%26id%3D03a74fdaf331447b\u0026type=video%2Fwebm%3B+codecs%3D%22vp8.0%2C+vorbis%22\u0026fallback_host=tc.v8.cache6.c.youtube.com\u0026sig=7AF1A7B663993D5DDF8205FB5C33630B99E6985E.765DAE164E4ED499B47F4C9DCE32F621152694D1\u0026quality=medium,itag=34\u0026url=http%3A%2F%2Fo-o---preferred---sn-x8vapo3-nv4e---v16---lscache7.c.youtube.com%2Fvideoplayback%3Fupn%3DBlgHS4N5zfQ%26sparams%3Dalgorithm%252Cburst%252Ccp%252Cfactor%252Cgcr%252Cid%252Cip%252Cipbits%252Citag%252Csource%252Cupn%252Cexpire%26fexp%3D905705%252C901809%252C922401%252C920704%252C912806%252C927201%252C900711%252C913546%252C913556%252C925109%252C919003%252C912706%252C900816%26ms%3Dau%26algorithm%3Dthrottle-factor%26burst%3D40%26ip%3D91.196.127.143%26itag%3D34%26gcr%3Dbg%26sver%3D3%26source%3Dyoutube%26mv%3Du%26key%3Dyt1%26ipbits%3D8%26factor%3D1.25%26cp%3DU0hTTlhNUV9OTENOM19QR1VJOlpNYm0xQjhzR1gw%26expire%3D1349823892%26id%3D03a74fdaf331447b\u0026type=video%2Fx-flv\u0026fallback_host=tc.v16.cache7.c.youtube.com\u0026sig=BC8ABBC73C0B94F2DA1AAF578E4560EC36CDB4EE.BE3342CE2918B9B7988ABE0541D9B3D3C97D3CEF\u0026quality=medium,itag=18\u0026url=http%3A%2F%2Fo-o---preferred---sn-x8vapo3-nv4e---v17---lscache5.c.youtube.com%2Fvideoplayback%3Fupn%3DBlgHS4N5zfQ%26sparams%3Dcp%252Cgcr%252Cid%252Cip%252Cipbits%252Citag%252Cratebypass%252Csource%252Cupn%252Cexpire%26fexp%3D905705%252C901809%252C922401%252C920704%252C912806%252C927201%252C900711%252C913546%252C913556%252C925109%252C919003%252C912706%252C900816%26ms%3Dau%26expire%3D1349823892%26itag%3D18%26ipbits%3D8%26gcr%3Dbg%26sver%3D3%26ratebypass%3Dyes%26source%3Dyoutube%26ip%3D91.196.127.143%26mv%3Du%26key%3Dyt1%26cp%3DU0hTTlhNUV9OTENOM19QR1VJOlpNYm0xQjhzR1gw%26id%3D03a74fdaf331447b\u0026type=video%2Fmp4%3B+codecs%3D%22avc1.42001E%2C+mp4a.40.2%22\u0026fallback_host=tc.v17.cache5.c.youtube.com\u0026sig=95F19040299E86B9F8E598F0A127FB51727E4027.0AD35F98A0172FD8F6A538711D822890D5D16091\u0026quality=medium,itag=5\u0026url=http%3A%2F%2Fo-o---preferred---sn-x8vapo3-nv4e---v1---lscache3.c.youtube.com%2Fvideoplayback%3Fupn%3DBlgHS4N5zfQ%26sparams%3Dalgorithm%252Cburst%252Ccp%252Cfactor%252Cgcr%252Cid%252Cip%252Cipbits%252Citag%252Csource%252Cupn%252Cexpire%26fexp%3D905705%252C901809%252C922401%252C920704%252C912806%252C927201%252C900711%252C913546%252C913556%252C925109%252C919003%252C912706%252C900816%26ms%3Dau%26algorithm%3Dthrottle-factor%26burst%3D40%26ip%3D91.196.127.143%26itag%3D5%26gcr%3Dbg%26sver%3D3%26source%3Dyoutube%26mv%3Du%26key%3Dyt1%26ipbits%3D8%26factor%3D1.25%26cp%3DU0hTTlhNUV9OTENOM19QR1VJOlpNYm0xQjhzR1gw%26expire%3D1349823892%26id%3D03a74fdaf331447b\u0026type=video%2Fx-flv\u0026fallback_host=tc.v1.cache3.c.youtube.com\u0026sig=962746F60E0FAE2901DF4BC0ECFACC759BF3ABF9.42A7E8318ED33DDE6A59504AA4F3BEF765D9F987\u0026quality=small,itag=36\u0026url=http%3A%2F%2Fo-o---preferred---sn-x8vapo3-nv4e---v23---lscache7.c.youtube.com%2Fvideoplayback%3Fupn%3DBlgHS4N5zfQ%26sparams%3Dalgorithm%252Cburst%252Ccp%252Cfactor%252Cgcr%252Cid%252Cip%252Cipbits%252Citag%252Csource%252Cupn%252Cexpire%26fexp%3D905705%252C901809%252C922401%252C920704%252C912806%252C927201%252C900711%252C913546%252C913556%252C925109%252C919003%252C912706%252C900816%26ms%3Dau%26algorithm%3Dthrottle-factor%26burst%3D40%26ip%3D91.196.127.143%26itag%3D36%26gcr%3Dbg%26sver%3D3%26source%3Dyoutube%26mv%3Du%26key%3Dyt1%26ipbits%3D8%26factor%3D1.25%26cp%3DU0hTTlhNUV9OTENOM19QR1VJOlpNYm0xQjhzR1gw%26expire%3D1349823892%26id%3D03a74fdaf331447b\u0026type=video%2F3gpp%3B+codecs%3D%22mp4v.20.3%2C+mp4a.40.2%22\u0026fallback_host=tc.v23.cache7.c.youtube.com\u0026sig=9051353F06847F6ED76E7C0983B8758578A13F2D.B72E5AF69578B8B6FD16B145482DAA23C8F3F26B\u0026quality=small,itag=17\u0026url=http%3A%2F%2Fo-o---preferred---sn-x8vapo3-nv4e---v9---lscache8.c.youtube.com%2Fvideoplayback%3Fupn%3DBlgHS4N5zfQ%26sparams%3Dalgorithm%252Cburst%252Ccp%252Cfactor%252Cgcr%252Cid%252Cip%252Cipbits%252Citag%252Csource%252Cupn%252Cexpire%26fexp%3D905705%252C901809%252C922401%252C920704%252C912806%252C927201%252C900711%252C913546%252C913556%252C925109%252C919003%252C912706%252C900816%26ms%3Dau%26algorithm%3Dthrottle-factor%26burst%3D40%26ip%3D91.196.127.143%26itag%3D17%26gcr%3Dbg%26sver%3D3%26source%3Dyoutube%26mv%3Du%26key%3Dyt1%26ipbits%3D8%26factor%3D1.25%26cp%3DU0hTTlhNUV9OTENOM19QR1VJOlpNYm0xQjhzR1gw%26expire%3D1349823892%26id%3D03a74fdaf331447b\u0026type=video%2F3gpp%3B+codecs%3D%22mp4v.20.3%2C+mp4a.40.2%22\u0026fallback_host=tc.v9.cache8.c.youtube.com\u0026sig=6B6A5932109E2C9242E4E13E458B0C4D29069BA4.0B635826890F636BC5830E2885001FD13D4C6657\u0026quality=small", "watermark": ",http:\/\/s.ytimg.com\/yt\/img\/watermark\/youtube_watermark-vflHX6b6E.png,http:\/\/s.ytimg.com\/yt\/img\/watermark\/youtube_hd_watermark-vflAzLcD6.png", "timestamp": 1349801569, "storyboard_spec": "http:\/\/i2.ytimg.com\/sb\/A6dP2vMxRHs\/storyboard3_L$L\/$N.jpg|48#27#100#10#10#0#default#sHHjk49hHpBer7bXfaS-r9DrbfQ|80#45#105#10#10#2000#M$M#kzeMyRhKUowVDoSmd125tIzgUrU|160#90#105#5#5#2000#M$M#twmlsiKJA71_dCDCT4TrSX-kLbw|320#180#105#3#3#2000#M$M#AvZcJwdTz4sdEr0meZZgsSKGyMQ", "iv_load_policy": 1, "showpopout": 1, "mpu": true, "hl": "bg_BG", "tmi": "1", "iv_logging_level": 4, "st_module": "http:\/\/s.ytimg.com\/yt\/swfbin\/st_module-vflVQgiyu.swf", "no_get_video_log": "1", "rvs": "view_count=193%2C338\u0026author=1artistmusic
END;
print_r(SetFlvUrls($file_contents));
?>
json_decode() needs a valid JSON object to convert to a PHP object or array. Please use
this site to check for valid JSON syntax.
10-23-2012, 05:46 AM
PM User |
#515
New Coder
Join Date: Sep 2012
Location: Germany
Posts: 32
Thanks: 8
Thanked 1 Time in 1 Post
HowTo install the YouTube to MP3 Components on Debian
HowTo install the YouTube to MP3 Components on Debian
[Install Webserver, PHP & curl]
Code:
apt-get install apache2 php5 libapache2-mod-php5 php5-cli curl libcurl3 php5-curl
[Restart Webserver]
Code:
/etc/init.d/apache2 restart
[Install Text editor VIM]
Code:
apt-get install VIM
(VIM Commands: Press i for insert Text
Press ESC for leave insert Mode
:w to save file
:q to quit VIM)
[Create 'public_html' directory]
Code:
mkdir /home/user/public_html
chmod 0777 /home/user/public_html
[~Move web root from '/var/www' to '/home/user/public_html'~]
[Open '/etc/apache2/sites-enabled/000-default' in text editor]
[Via command line, you do it like this:]
Code:
vim /etc/apache2/sites-enabled/000-default
Code:
[Change 'DocumentRoot /var/www' to 'DocumentRoot /home/user/public_html']
[Change '<Directory /var/www/>' to '<Directory /home/user/public_html/>']
[Save and close file in text editor]
[Restart Webserver]
Code:
/etc/init.d/apache2 restart
[Create a phpinfo.php file and put it into /home/user/public_html]
Code:
vim /home/user/public_html/phpinfo.php
[Save and close file in text editor]
[Open phpinfo.php in browser (http://localhost/phpinfo.php ) to verify Apache/PHP are working]
[Edit Sources]
Code:
vim /etc/apt/sources.list.d/deb-multimedia.org.list
[Save and close file in text editor]
Code:
apt-get update
apt-get install deb-multimedia-keyring
apt-get update
[Install Codecs]
Code:
Attention!
For 32bit Systems
apt-get install w32codecs
For 64bit Systems
apt-get install w64codecs
[Install FFmpeg]
Code:
apt-get install ffmpeg
[Install ffmpeg-php PHP extension]
Code:
apt-get install php5-ffmpeg
[Restart Webserver]
Code:
/etc/init.d/apache2 restart
[Download all ffmpeg.presets]
Copy all files to: /usr/share/ffmpeg
[You're done !! Debian is now ready for you to install and configure the YouTube-to-Mp3 Converter software.]
Last edited by chump2877; 10-23-2012 at 05:24 PM ..
Reason: removed reference to README.txt, which doesn't exist in free version of app
Users who have thanked Luckyplaya for this post:
10-23-2012, 05:22 PM
PM User |
#516
Senior Coder
Join Date: Dec 2004
Location: the U.S. of freakin' A.
Posts: 2,530
Thanks: 15
Thanked 128 Times in 121 Posts
Thanks Luckyplaya...hopefully that will help someone running Debian...
But don't you still need to modify the server php.ini (in Debian) and add references to the ffmpeg and curl extensions?
10-24-2012, 02:58 AM
PM User |
#517
New Coder
Join Date: Sep 2012
Location: Germany
Posts: 32
Thanks: 8
Thanked 1 Time in 1 Post
Quote:
Originally Posted by
chump2877
Thanks Luckyplaya...hopefully that will help someone running Debian...
But don't you still need to modify the server php.ini (in Debian) and add references to the ffmpeg and curl extensions?
No, debian puts this to Automatic in
/etc/php5/conf.d
I also try to write a howto for CentOS
11-03-2012, 03:18 AM
PM User |
#518
New Coder
Join Date: Nov 2012
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
On other computers..
Hello must say its a really cool thing u have done.
Its working perfect on my Linux machine fast and stable. Problem is when someone is trying to convert a youtube clip from another ip adress it download the *.flv to100% after that the convert will not begin stuck at 0%.
192.168.1.* -> myip -> domain
I hope u understand what im trying to say. //slaine
Last edited by slaine; 11-03-2012 at 11:15 AM ..
11-03-2012, 03:46 PM
PM User |
#519
New Coder
Join Date: Sep 2012
Location: Germany
Posts: 32
Thanks: 8
Thanked 1 Time in 1 Post
Quote:
Originally Posted by
slaine
Hello must say its a really cool thing u have done.
Its working perfect on my Linux machine fast and stable. Problem is when someone is trying to convert a youtube clip from another ip adress it download the *.flv to100% after that the convert will not begin stuck at 0%.
192.168.1.* -> myip -> domain
I hope u understand what im trying to say. //slaine
correct port forwarding?
11-03-2012, 06:12 PM
PM User |
#520
New Coder
Join Date: Sep 2012
Location: Germany
Posts: 32
Thanks: 8
Thanked 1 Time in 1 Post
Hi chump2877,
could be in the script somehow inserting language files?
If so how does that work?
that they are e.g. can now access domain.tld/index,php?lang=de, domain.tld/index,php?lang=en
I would also ask the German language file for disposal.
11-03-2012, 06:21 PM
PM User |
#521
New Coder
Join Date: Nov 2012
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by
Luckyplaya
correct port forwarding?
What port do i need to open here they can reach the page download the *.flv and the picture of the youtube clip to 100% bur not able to convert! dont think its the port.
11-03-2012, 07:14 PM
PM User |
#522
New Coder
Join Date: Sep 2012
Location: Germany
Posts: 32
Thanks: 8
Thanked 1 Time in 1 Post
Sorry, it had probably misunderstood.
Locally on the Linux machine, everything works?
and in the local network or over the Internet it does not work?
did I understand you correctly?
11-03-2012, 07:55 PM
PM User |
#523
New Coder
Join Date: Nov 2012
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by
Luckyplaya
Sorry, it had probably misunderstood.
Locally on the Linux machine, everything works?
and in the local network or over the Internet it does not work?
did I understand you correctly?
Over the internet, i have asked 20 user that i have on facebook to try it. 2 of them could convert like i do local. the other 18 get stucked in convert mp3.
11-03-2012, 09:20 PM
PM User |
#524
New Coder
Join Date: Sep 2012
Location: Germany
Posts: 32
Thanks: 8
Thanked 1 Time in 1 Post
Quote:
Originally Posted by
slaine
Over the internet, i have asked 20 user that i have on facebook to try it. 2 of them could convert like i do local. the other 18 get stucked in convert mp3.
what to say because the log files?
Which browser do people use?
have the correct folder right? (777)
Folder: Video, Output, Ringtone and Log
11-03-2012, 09:37 PM
PM User |
#525
New Coder
Join Date: Nov 2012
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by
Luckyplaya
what to say because the log files?
Which browser do people use?
have the correct folder right? (777)
Folder: Video, Output, Ringtone and Log
O yes chmod 777 are set no error in log files no logfiles created so no error.
This is browsertested in safari,chrome,IE,FF i dont read anywhere that is should be problem in diff browsers. check here
www.snuthuset.se for phpinfo see if i missed something. //mvh slaine
Jump To Top of Thread
Thread Tools
Rate This Thread
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
All times are GMT +1. The time now is 11:42 AM .
Advertisement
Log in to turn off these ads.