473,395 Members | 1,885 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

login in to Orkut

Hi all,

I a beginner in to asp.net and learning to use httpwebrequest. I am trying to login to orkut.com using the following code.... but unfortunatly i am unable to login to it

Can some one please help me by correcting the code....

Thanks in advance...
Expand|Select|Wrap|Line Numbers
  1. Dim cookieJar As CookieContainer = New CookieContainer
  2.         Dim webReq As HttpWebRequest
  3.         Dim webResp As HttpWebResponse
  4.         Dim sr As StreamReader
  5.         Dim sw As StreamWriter
  6.         Dim payLoad As String
  7.         Dim txt As String
  8.         Dim urlstring As String = "http://www.orkut.com"
  9.         Dim uristring As String = ""
  10.  
  11.         webReq = CType(WebRequest.Create(New Uri(urlString)), HttpWebRequest)
  12.         webReq.CookieContainer = cookieJar
  13.         webReq.Credentials = CredentialCache.DefaultCredentials
  14.         webReq.UserAgent = "BGClient"
  15.         webReq.KeepAlive = True
  16.         webReq.Headers.Set("Pragma", "no-cache")
  17.         webReq.Timeout = 5000
  18.         webReq.Method = "GET"
  19.  
  20.         ' get login page
  21.         webResp = webReq.GetResponse
  22.  
  23.         sr = New StreamReader(webResp.GetResponseStream)
  24.         txt = sr.ReadToEnd.Trim
  25.         sr.Close()
  26.         webResp.Close()
  27.  
  28.         webReq = CType(WebRequest.Create(New Uri(urlString & uriString)), HttpWebRequest)
  29.         webReq.CookieContainer = cookieJar
  30.         webReq.Credentials = CredentialCache.DefaultCredentials
  31.         webReq.UserAgent = "BGClient"
  32.         webReq.KeepAlive = True
  33.         webReq.Headers.Set("Pragma", "no-cache")
  34.         webReq.Timeout = 5000
  35.         webReq.Method = "POST"
  36.         webReq.ContentType = "application/x-www-form-urlencoded"
  37.  
  38.         payLoad = "Login=admin&Password=fuck&submit=Login&Validation Req=1&WhichBrowser=Microsoft+Internet+Explorer&pgB rowserVersion=4.0+(compatible;+MSIE+6.0;+Windows+N T+5.1;+.NET+CLR+1.1.4322;+.NET+CLR+1.0.3705)"
  39.  
  40.         webReq.ContentLength = payLoad.Length
  41.         sw = New StreamWriter(webReq.GetRequestStream)
  42.         sw.Write(payLoad)
  43.         sw.Close()
  44.  
  45.         ' post login parms
  46.         webResp = webReq.GetResponse
  47.  
  48.         sr = New StreamReader(webResp.GetResponseStream)
  49.         txt = sr.ReadToEnd.Trim
  50.         MsgBox(txt)
  51.         sr.Close()
  52.         webResp.Close()
Oct 15 '09 #1
1 2525
Frinavale
9,735 Expert Mod 8TB
You aren't using ASP.NET.
It looks like you're developing a windows desktop application......
Oct 16 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Blmn | last post by:
anybody knows how star buttons on gmail work? or friend-rates on orkut? they use the same technic. it should be some sort of connection between c# and javascript. any article or tips would be...
1
by: Fabiano | last post by:
Please, someone know how can i do a background postback, such as the "Friend Karma" at Orkut? Tks in adv. Fabiano
6
by: AppleBag | last post by:
I'm having the worst time trying to login to myspace through code. Can someone tell me how to do this? Please try it yourself before replying, only because I have asked this a couple of times in...
1
by: Soby | last post by:
Hi, Is there any orkut api for .net users .Plese send reply its very urgent Soby/-
4
by: hsn22 | last post by:
im trying to log into orkut so i can do some things on the page. but im having trouble logging into the orkut page. this is as far as i have come (yay!) this is the link that logs people into...
9
bajajv
by: bajajv | last post by:
Hi, I am having problem in accessing gmail and orkut. It gives The page cannot be displayed. The ssl 2.0 and ssl 3.0 are enabled. I am having xp sp2. Any idea how it can be solved? Thanks.
7
dmjpro
by: dmjpro | last post by:
Hi Experts. I m now days doing test on ORKUT JS code. I need your help experts. Now there are multiple forms in a page. But no actions are there. Now when the page is submitted then this...
10
by: jodleren | last post by:
Hi I know, that there are a lot of people having problems with orkut.com, errors like "object expected" and named objects missing. When loading the site can generate some 10 errors, and still...
13
by: Apostle | last post by:
Hi all, after thinking for sometimes, I thought it will be great opportunity to learn if I will start from scratch and build my own register/login system. Here is the thread that I will be posting...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.