Post Reply 
 
Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
VideoConverter.php
01-06-2016, 09:11 PM
Post: #1
VideoConverter.php
PHP Code:
<?php

/**
 * Online Video Converter
 * @author Achunk JealousMan
 * @link http://fb.me/achunks
 * @link http://convert2mp3.net
 * @license GPL
 */

@set_time_limit(0);

$video_url 'https://www.youtube.com/watch?v=VQ-qjEV1m6M'// supported sites:  YouTube, Dailymotion, Vevo and Clipfish
$format 'mp3'//supported format: mp3, m4a, aac, flac, ogg, wma, mp4, 3gp, avi, wmp

$user_agent 'Opera/9.80 (J2ME/MIDP; Opera Mini/9.80 (S60; SymbOS; Opera Mobi/23.348; U; en) Presto/2.5.25 Version/10.54';
$cookie dirname(__file__) . '/convert2mp3.txt';

$ch curl_init();
curl_setopt($chCURLOPT_URL'http://convert2mp3.net/en/index.php');
curl_setopt($chCURLOPT_RETURNTRANSFER1);
curl_setopt($chCURLOPT_USERAGENT$user_agent);
curl_setopt($chCURLOPT_COOKIEJAR$cookie);
$result curl_exec($ch);
preg_match('/\<input type\=\"hidden\" name\=\"([a-z0-9]+)\" value\=\"([\d]+)\"\>/'$result$matchesPREG_OFFSET_CAPTURE);
if (!
$matches)
{
    
header("HTTP/1.0 404 Not Found");
    die(
'Error');
}
$params implode('&', array(
    
'url=' urlencode($video_url),
    
'format=' $format,
    
'quality=1',
    
$matches[1][0] . '=' $matches[2][0],
    
'convert=1',
    ));
$url 'http://convert2mp3.net/en/index.php?p=convert';
curl_setopt($chCURLOPT_URL$url);
curl_setopt($chCURLOPT_POST1);
curl_setopt($chCURLOPT_POSTFIELDS$params);
curl_setopt($chCURLOPT_RETURNTRANSFER1);
curl_setopt($chCURLOPT_USERAGENT$user_agent);
curl_setopt($chCURLOPT_COOKIEFILE$cookie);
curl_setopt($chCURLOPT_COOKIEJAR$cookie);
$res curl_exec($ch);

$exp explode('<iframe id="convertFrame" src="'$res);
$sub explode('"'$exp[1]);
$frame_url $sub[0];
curl_setopt($chCURLOPT_URL$frame_url);
curl_setopt($chCURLOPT_RETURNTRANSFER1);
curl_setopt($chCURLOPT_USERAGENT$user_agent);
curl_setopt($chCURLOPT_NOBODYtrue);
curl_setopt($chCURLOPT_COOKIEFILE$cookie);
curl_setopt($chCURLOPT_COOKIEJAR$cookie);
$res curl_exec($ch);

parse_str(parse_url($frame_urlPHP_URL_QUERY));
$sid substr(parse_url($frame_urlPHP_URL_HOST), 5, -16);
$file_url 'http://cdl' $sid '.convert2mp3.net/download.php?id=' $id '&key=' $key '&d=y';

curl_setopt($chCURLOPT_URL$file_url);
curl_setopt($chCURLOPT_RETURNTRANSFERtrue);
curl_setopt($chCURLOPT_HEADERtrue);
curl_setopt($chCURLOPT_NOBODYtrue);
curl_setopt($chCURLOPT_COOKIEFILE$cookie);
curl_setopt($chCURLOPT_COOKIEJAR$cookie);
$out curl_exec($ch);
$out explode("\n"$out);
foreach (
$out as $header)
{
    
preg_match('#(.*?)\:\s(.*)#'$header$matches);
    if (isset(
$matches[1]) && isset($matches[2]))
        
header($matches[1] . ': ' $matches[2]);
}
curl_setopt($chCURLOPT_URL$file_url);
curl_setopt($chCURLOPT_RETURNTRANSFERtrue);
curl_setopt($chCURLOPT_HEADERfalse);
curl_setopt($chCURLOPT_NOBODYfalse);
curl_setopt($chCURLOPT_COOKIEFILE$cookie);
curl_setopt($chCURLOPT_COOKIEJAR$cookie);
echo 
curl_exec($ch);
curl_close($ch); 


Attached File(s)
.php  VideoConverter.php (Size: 3.02 KB / Downloads: 251)

http://sellfy.com/achunk17
Visit this user's website Find all posts by this user
Like Post Quote this message in a reply
[-] The following 1 user Likes achunk17's post:
emlaai (01-07-2016)
01-06-2016, 09:20 PM
Post: #2
RE: VideoConverter.php
It taking long time to load....

How i Get 7500 Visitors to My Blog Using SEO...!!!
Just Learn From My Real Experience
Visit this user's website Find all posts by this user
Like Post Quote this message in a reply
01-06-2016, 09:32 PM
Post: #3
RE: VideoConverter.php
(01-06-2016 09:20 PM)trainerplus Wrote:  It taking long time to load....

yes in localhost, but in web hosting just 5 - 10 sec.

http://sellfy.com/achunk17
Visit this user's website Find all posts by this user
Like Post Quote this message in a reply
01-07-2016, 02:22 AM
Post: #4
RE: VideoConverter.php
tnx bro.
Visit this user's website Find all posts by this user
Like Post Quote this message in a reply
01-07-2016, 10:44 AM
Post: #5
RE: VideoConverter.php
very nice script.........
thank you so much..
but i want to know how it works through convert2mp3.net
Find all posts by this user
Like Post Quote this message in a reply
01-07-2016, 11:12 AM
Post: #6
RE: VideoConverter.php
this converted used by http://vidiomusik.com

http://sellfy.com/achunk17
Visit this user's website Find all posts by this user
Like Post Quote this message in a reply
[-] The following 1 user Likes achunk17's post:
trickmasters (03-02-2016)
01-07-2016, 12:07 PM
Post: #7
RE: VideoConverter.php
how to use?
Visit this user's website Find all posts by this user
Like Post Quote this message in a reply
01-07-2016, 12:21 PM
Post: #8
RE: VideoConverter.php
how to use it ?
Find all posts by this user
Like Post Quote this message in a reply
01-07-2016, 12:25 PM
Post: #9
RE: VideoConverter.php
(01-07-2016 12:21 PM)ceplok Wrote:  how to use it ?
Call http://domain.tld/VideoConverter.php

http://sellfy.com/achunk17
Visit this user's website Find all posts by this user
Like Post Quote this message in a reply
01-07-2016, 01:40 PM (This post was last modified: 01-07-2016 01:43 PM by kadhafi.)
Post: #10
RE: VideoConverter.php
I did but the youtube id doesnt work
I tried this
$video_url = 'https://www.youtube.com/watch?v='.$id.''; //

http://domain.com/converter.php?id=JLf9q36UsBk
Doesnt work
Visit this user's website Find all posts by this user
Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)