Skip to content

Instantly share code, notes, and snippets.

View sionex-code's full-sized avatar
🎯
Focusing

sionex-code

🎯
Focusing
View GitHub Profile
/*
this simple snippets will give you downloadable url of soundcloud.
just slap soundcloud url like this way in csharp Download('Soundcloud url'); this will returned downloadable url
*/
public string Download(string songurl){
string returned = null;
HttpWebRequest hc = (HttpWebRequest)WebRequest.Create(songurl);
hc.UserAgent = "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.124 Safari/537.36";
HttpWebResponse hresponse = (HttpWebResponse)hc.GetResponse();
System.IO.StreamReader sr = new System.IO.StreamReader(hresponse.GetResponseStream());