PHP Classes

youtube to mp3 iframe widgets: Embed MP3 player for audio extracted from YouTube

Recommend this page to a friend!
  Info   View files Example   Demos   Screenshots Screenshots   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 224 All time: 8,226 This week: 488Up
Version License PHP version Categories
yt-to-mp3-iframe 1.0.0The PHP License5HTML, PHP 5, Audio, Video


This class can embed MP3 player for audio extracted from YouTube.

It generates a HTML iframe that embeds a MP3 audio player for a given YouTube video.

The embedded page will display the player loaded from site that does the actual conversion of the YouTube video and audio.

Picture of Kapil Sharma
  Performance   Level  
Name: Kapil Sharma <contact>
Classes: 1 package by
Country: India India
Age: ???
All time rank: 1925118 in India India
Week rank: 286 Up17 in India India Up
Innovation award
Innovation award
Nominee: 1x


// passing value to varible directly
// You can need to change this value with youtube video ID,

$yid = $_GET['id'];

$yid)) {
$yid = 'lF-jPBnZ098'; // we added this line for demo purpose, if you don't pass any value to variable

// calling class

// Creating object
$object = new ytiframe();

// Calling Class
$response = $object->generate($yid);

<title>YouTube To Mp3 Iframe Widgets</title>
div.error {
    border: 2px solid #ccc!important;
    border-radius: 16px;
    padding: 0.01em 10px;



if(isset($yid)&&($response)) {

"You Iframe Embed code:<br/>";
$response; // This variable contains iframe code
echo "<br/>";






This php class can provide you functionality of embedding youtube to mp3 conversion widgets in your webpage/website for free!

<h2>Installation</h2> <ul> <li>Just download a copy of this php class on your pc.</li> <li>Then, upload the downloaded zip file on your webserver.</li> <li>Extract the zip files</li> <li>If you've uploaded the files in public_html or in a directory.</li> <li>Just the webpage in your web browsers like or</li> <li>That's it! You'll see a yt to mp3 widgets with download link.</li> </ul>

<h3>Requirements</h3> <li>PHP enabled any webserver or loaclhost, no additional plugins like ffmpeg/youtube-dl is needed.</li>

<h3>Support</h3> <p>You know it's a free service but still don't hesitate to ask me any query at<br/> I'll do my best to help you :)</p>

  • screenshots
  Files folder image Files  
File Role Description
Plain text file class.php Class Class source
Accessible without login Plain text file index.php Example Example script
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file Doc. Documentation

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:8,226
This week:488Up