Ok, I just found something interesting:
https://www.google.com/accounts/Serv...ervice=youtube
POST /accounts/ServiceLoginAuth?service=youtube HTTP/1.1
Host:
www.google.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.11) Gecko/2009060215 Firefox/3.0.11 GTB5 (.NET CLR 3.5.30729)
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer:
https://www.google.com/accounts/Serv...6next%3D/index
Cookie: __utma=173272373.1105690668.1227276687.1242737452. 1244276445.17; __utmc=173272373; GA3T=ANGHy1CFtro; GoogleAccountsLocale_session=en; __utma=173272373.1105690668.1227276687.1238227375. 1238438675.12; __utmz=173272373.1238438675.11.2.utmccn=(referral) |utmcsr=google.com|utmcct=/|utmcmd=referral; LSID=groups2.US|mail|pages|s.SI|sierra|writely|you tube|youtubepartnersyn:DQAAAIMAAADm8DQ0psCXVyFJ7O6 jcpVrhiCtP0g03HsoswT-O1WqdhSkA_zH5uhyMISF0JdOFv3kZ_2Mk_2GkoVdUhkXMtWLVw G_q6aZwX_D9HrqJKt-eepJpxnBeATxrYRTnQ5537u5rBR7MhA_uX_C972xfT4bvGwvoG 3AsC2Jsp76U3AldK86ksP66ISpCgNLm5nDUGI; GAUSR=mail|s.SI|writely:gvnpublic@gmail.com; __utmc=173272373; GALX=nQYPV6vAv54; PREF=ID=47b9b9149021b3b1:U=234f9c3e1a77bf4f:TB=2:L D=en:CR=2:TM=1239037183:LM=1243446110:DV=AA:GM=1:S =ZpvNk3xHHHjJPTFx; rememberme=true; adsenseReferralSourceId=aso; adsenseReferralSubId=ww-en-et-gaia; adsenseReferralUrl=www.google.com/accounts/ManageAccount; adsenseReferralUrlQuery=null; SID=DQAAAIEAAABvGELRP2l_usguy7ysl7Vy0bwRQY21fKhmnQ 2GQ_NZRZG9f8BG61WZJtnTtbEAdsMtl_PMrhFT0YnofhLxeeun 444yMOIuhqbSZi_0yHaVrN8APSGkDF79j0wtajalGlDNzZjJU-Pryqm0d2qW0sPyClE8rLKFoXpxW5zCm0P92Q3-hoVJVTF8vJ5u8juKzMM; NID=23=joYanjPxvSjRfBZ9Ozp2w_gXI9oCowZ9vVFO_GK3jZ7 awg4y-dU62tuwID6eRfX9eCJOkR2yixQCQluXNCSyw_JbW_rL76gWG1s dDaSOb79Lj56X4UujeQJ9FHp96R7p; TZ=-120; S=writely=CNDrwzWvciY
Content-Type: application/x-www-form-urlencoded
Content-Length: 287
ltmpl=sso&continue=http%3A%2F%2Fwww.youtube.com%2F signup%3Fhl%3Den_US%26warned%3D%26nomobiletemp%3D1 %26next%3D%2Findex&service=youtube&uilel=3<mpl=s so&hl=en_US<mpl=sso&GALX=nQYPV6vAv54&Email=GVNPu blic123&Passwd=hiddenonforums&PersistentCookie=yes &rmShown=1&signIn=Sign+in&asts=
HTTP/1.x 200 OK
Set-Cookie: GoogleAccountsLocale_session=en
Set-Cookie: GALX=nQYPV6vAv54;Path=/accounts;Secure
Content-Type: text/html; charset=UTF-8
Cache-Control: no-cache, no-store
Pragma: no-cache
Expires: Mon, 01-Jan-1990 00:00:00 GMT
Content-Encoding: gzip
Date: Sat, 13 Jun 2009 07:59:15 GMT
X-Content-Type-Options: nosniff
Content-Length: 4484
Server: GFE/2.0
Specially got interested in this line:
ltmpl=sso&continue=http%3A%2F%2Fwww.youtube.com%2F signup%3Fhl%3Den_US%26warned%3D%26nomobiletemp%3D1 %26next%3D%2Findex&service=youtube&uilel=3<mpl=s so&hl=en_US<mpl=sso&GALX=nQYPV6vAv54&Email=GVNPu blic123&Passwd=hiddenonforums&PersistentCookie=yes &rmShown=1&signIn=Sign+in&asts=
Now what I have is:
public bool Login(string username, string password, CookieContainer cookies, string useragent)
{
try
{
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://www.youtube.com/login?next=/index");
request.Method = "POST";
request.ContentType = "application/x-www-form-urlencoded";
request.AllowAutoRedirect = true;
request.CookieContainer = cookies;
request.UserAgent = useragent;
request.Timeout = 0x1388;
request.KeepAlive = false;
}
I guess now I have to somehow post the username and password data. But I have no idea how it should look like. I guess I have to write to request stream, but as I said, I have no idea how ( I am 100% new to web based app).