Click here to Skip to main content
13,296,377 members (56,953 online)
Click here to Skip to main content
Add your own
alternative version


3 bookmarked
Posted 13 Apr 2011

Ufizy Player

, 3 May 2011
Rate this:
Please Sign up or sign in to vote.
Use to listen to songs


I want to start with speaking about First, I should say is totally legal and it uses legal video websites to search songs like,, etc. For example, takes a link from, then it uses the link with some string procedures. This article is about and how we can listen to songs from there. ALSO I SHOULD SAY THIS APPLICATION IS ONLY AN INTERFACE FOR UFIZY! Just for once, click and write your favorite song, then click F! button. And the searched list is in front of you. So if you see and learn how you can listen to songs with, you can listen to them with this program. I used HTMLELEMENT class for all these progresses. Please examine the code parts for wide expression.

And if you are a beginner, I want to say something else. First, open your explorer, then navigate to and just right click to this website. And click "View Page Source". You can see a code part like this (<input id = "s" type="text" ...) that means "s" is their textbox's id. We can also reach it with this id. You can see this too (<input name="dinle" type="image"...) and that means our F! button's name is "dinle" and we can reach it with this name.


First of all, MSDN says:

"HtmlElement represents any possible type of element in an HTML document, such as BODY, TABLE, and FORM, among others. The class exposes the most common properties you can expect to find on all elements."

And at this link, you can get detailed information about its methods. HTML elements can have children, you can reach them with Children collection. "GetAttiribute" and "SetAttiribute" methods help you to set or get any attribute or property on a specific element. "InvokeMember" method provides access to any methods in HTML documents. HTML documents can be modified or can be changed. For this, you can use "CreateElement" method of HtmlDocument.

Using the Code

HTMLELEMENT class is very useful to get tags of a website or login a website and more. First of all, we should use a webbrowser component to enter the website. When this component finishes all load progresses, then we can reach all documents of loaded website. On form load, I did this job with 'web.Navigate(<a href=""></a>)' method. Just look at the bottom.

My Functions

First of all, I didn't use arraylists for you to show what is happening at the back. Also functions depend on htmlelement and some stream progresses for a user list.

  private void Form1_Load(object sender, EventArgs e)
            web.Navigate(""); //We should reach documents of website.
            lstTag.Dock = DockStyle.Fill;
            grpUst.Visible = false;
            lstTag.Items.Add("LUTFEN YÜKLENIRKEN BEKLEYINIZ..");

//These code parts for Textbox and Search button of this website. And if you examine
//these codes, you can understand how you can enter your search with C#.
  foreach (HtmlElement el in web.Document.All)
                switch (el.Id)
                    //innertext means the text which behind of visible website.
                    case "s": el.InnerText = txtSarkiAdi.Text; break; 
            foreach (HtmlElement el in web.Document.All)
                switch (el.Name)
                    //InvokeMember() class runs an input's method in website like "dinle".
                    case "dinle": el.InvokeMember("click"); break; 
private void btnPlaylist_Click(object sender, EventArgs e) // FOR A PERSONAL USER LIST
           if (this.Size == new Size(547, 389) && lstplaylist.Items.Count==0)
               MessageBox.Show("Kayitli Listeniz Varsa Lütfen Seçiniz."); //CHECK IF
                           //THERE IS A SAVED LIST
               if (opf.ShowDialog() == DialogResult.OK) // IF NOT
                   if (opf.FileName != "" && opf.FileName != null)
           (opf.FileName, lstplaylistlinkler, lstplaylist);
                       playlistyol = opf.FileName;
               this.Size = new Size(547, 560);
           else if (lstplaylist.Items.Count>0)
               this.Size = new Size(547, 560);
               this.Size = new Size(547, 389);
private void LinkVeTagAl() //The timer will help us to get "href" attiribute 
			//of songs in searched list.
            HtmlElementCollection tags = web.Document.Links;
            foreach (HtmlElement item in web.Document.Links)
            for (int i = 0; i < web.Document.Links.Count; i++)
                if (tags[i].OuterText != null && Regex.IsMatch(tags[i].OuterText, 
		"[0-9]", RegexOptions.IgnoreCase))  //In "lstilk" named listbox, there 
				//are all links. We should get first Tags then links.
            for (int i = 0; i < lstilk.Items.Count; i++)  //I can use an array but 
			//I prefer to do it with listbox FOR YOU to see everything!
                string dnm = lstilk.Items[i].ToString();
                if (dnm.Contains("player2.php")) //In ufizy Searched song names 
					//keep on player2.php
                    string[] parcalar = dnm.Split(new Char[] { '=' }, 11);
                    lstLinkler.Items.Add("" + 
			parcalar[1] + "/r/!/");

First gets links from a legal video website like youtube, then it uses links like this -->First Part /#bAsA00-5KoI/ -->Second r/ -->Third !/ --> and last. So we need # and 11 character from this #. When we search in, then 'player2.php' holds all of these links. We should get it and just clean it up. :)

Other functions are for Playlist or other things. WebBrowser component helps us to listen to songs. I used 2 webbrowsers; the first one for search is invisible and the second one is the Player.

Please examine zip file for the source code.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Team Leader Eterne
Turkey Turkey
No Biography provided

You may also be interested in...

Comments and Discussions

QuestionMy vote of 1 Pin
Amir Jalilifard24-Sep-13 0:22
memberAmir Jalilifard24-Sep-13 0:22 
GeneralMy vote of 5 Pin
Member 78700106-May-11 7:51
memberMember 78700106-May-11 7:51 
GeneralGood one the Idea, not the design maybe not the coding style but the idea. Pin
yesotaso5-May-11 6:47
memberyesotaso5-May-11 6:47 
GeneralRe: Good one the Idea, not the design maybe not the coding style but the idea. [modified] Pin
SercanOzdemir5-May-11 7:06
memberSercanOzdemir5-May-11 7:06 
GeneralMy vote of 1 Pin
charles henington28-Apr-11 14:46
membercharles henington28-Apr-11 14:46 
GeneralRe: My vote of 1 Pin
SercanOzdemir29-Apr-11 3:09
memberSercanOzdemir29-Apr-11 3:09 
GeneralRe: My vote of 1 Pin
charles henington29-Apr-11 10:15
membercharles henington29-Apr-11 10:15 
GeneralRe: My vote of 1 Pin
SercanOzdemir29-Apr-11 10:33
memberSercanOzdemir29-Apr-11 10:33 
GeneralRe: My vote of 1 Pin
charles henington2-May-11 15:42
membercharles henington2-May-11 15:42 
GeneralRe: My vote of 1 Pin
SercanOzdemir3-May-11 0:33
memberSercanOzdemir3-May-11 0:33 
GeneralRe: My vote of 1 Pin
charles henington4-May-11 4:15
membercharles henington4-May-11 4:15 
GeneralRe: My vote of 1 Pin
SercanOzdemir4-May-11 5:18
memberSercanOzdemir4-May-11 5:18 
GeneralRe: My vote of 1 Pin
charles henington15-May-11 5:26
membercharles henington15-May-11 5:26 
GeneralRe: My vote of 1 Pin
SercanOzdemir15-May-11 5:51
memberSercanOzdemir15-May-11 5:51 
GeneralRe: My vote of 1 Pin
charles henington16-May-11 1:13
membercharles henington16-May-11 1:13 
GeneralRe: My vote of 1 Pin
SercanOzdemir16-May-11 4:22
memberSercanOzdemir16-May-11 4:22 
GeneralA suggestion Pin
Charles Cox27-Apr-11 21:19
memberCharles Cox27-Apr-11 21:19 
GeneralRe: A suggestion Pin
SercanOzdemir28-Apr-11 1:16
memberSercanOzdemir28-Apr-11 1:16 
GeneralRe: A suggestion Pin
charles henington4-May-11 4:27
membercharles henington4-May-11 4:27 
GeneralMy vote of 1 Pin
dimzon23-Apr-11 23:24
memberdimzon23-Apr-11 23:24 
GeneralRe: My vote of 1 Pin
SercanOzdemir24-Apr-11 0:32
memberSercanOzdemir24-Apr-11 0:32 
GeneralRe: My vote of 1 [modified] Pin
dimzon24-Apr-11 8:46
memberdimzon24-Apr-11 8:46 
GeneralRe: My vote of 1 Pin
SercanOzdemir24-Apr-11 10:00
memberSercanOzdemir24-Apr-11 10:00 
GeneralMy vote of 3 Pin
JackDanyelZ0023-Apr-11 22:54
memberJackDanyelZ0023-Apr-11 22:54 
GeneralRe: My vote of 3 Pin
SercanOzdemir24-Apr-11 0:31
memberSercanOzdemir24-Apr-11 0:31 
GeneralDownload Section Pin
SercanOzdemir23-Apr-11 7:01
memberSercanOzdemir23-Apr-11 7:01 
GeneralMy vote of 2 Pin
GlobX18-Apr-11 20:46
memberGlobX18-Apr-11 20:46 
GeneralRe: My vote of 2 Pin
SercanOzdemir19-Apr-11 4:37
memberSercanOzdemir19-Apr-11 4:37 
GeneralRe: My vote of 2 Pin
SercanOzdemir19-Apr-11 4:41
memberSercanOzdemir19-Apr-11 4:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.171207.1 | Last Updated 3 May 2011
Article Copyright 2011 by SercanOzdemir
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid