Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > General Coding > Coding Tutorials
You last visited: Today at 15:48

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[VB.NET] HttpWebRequest - Tutorial

Discussion on [VB.NET] HttpWebRequest - Tutorial within the Coding Tutorials forum part of the General Coding category.

Reply
 
Old 12/18/2011, 13:33   #16



 
Train™'s Avatar
 
elite*gold: 150
The Black Market: 259/0/0
Join Date: Oct 2011
Posts: 3,220
Received Thanks: 523
Quote:
Originally Posted by xKraizy View Post
WebBrowser? Ich benutze die nicht weil die mist sind und was soll man da für ein Tutorial machen?
ja du hast recht^^

aber was meinst du mit "textboxQuelltext" ?
Train™ is offline  
Old 12/18/2011, 18:16   #17
 
Kraizy​'s Avatar
 
elite*gold: 0
The Black Market: 471/0/0
Join Date: Apr 2010
Posts: 9,696
Received Thanks: 1,811
Das ist nur ein Beispiel..kann man ja benutzen um in der TextBox den Seitenquelltext anzeigen zu lassen. Musst du natürlich nicht machen.
Kraizy​ is offline  
Old 02/28/2012, 16:30   #18
 
DasSchwarzeT's Avatar
 
elite*gold: 399
Join Date: Sep 2011
Posts: 5,323
Received Thanks: 3,937
Ich weiß halt nich wo das
PHP Code:
Private Sub btnLogin_Click (sender As ObjectAs EventArgsHandles btnLogin.Click
   Dim h 
As New Http
   
//Login ausführen
   
textboxQuelltext.Text h.GetResponse("http://www.elitepvpers.com/forum/login.php?do=login""vb_login_username=EPVP_USERNAME&vb_login_password=EPVP_PASSWORT&cookieuser=1&s=&securitytoken=guest&do=login&vb_login_md5password=&vb_login_md5password_utf=")
   
//Hauptseite aufrufen
   
textboxQuelltext.Text h.GetResponse("http://www.elitepvpers.com/forum/")
   
//prüfen, ob Login erfolgreich war
   
If textboxQuelltext.Text.Contains("Log Out")
      
//eingeloggt
   
Else
      
//nicht eingeloggt
   
End If
End Sub 
hinkommt..
DasSchwarzeT is offline  
Old 02/28/2012, 16:38   #19
 
Kraizy​'s Avatar
 
elite*gold: 0
The Black Market: 471/0/0
Join Date: Apr 2010
Posts: 9,696
Received Thanks: 1,811
Bitte lieber erst Grundlagen lernen, bevor du an so einem Thema arbeitest. Das ist eine ganz normale Methode, die aufgerufen wird, wenn der Button "btnLogin" geklickt wurde.
Kraizy​ is offline  
Thanks
1 User
Old 02/28/2012, 18:04   #20
 
DasSchwarzeT's Avatar
 
elite*gold: 399
Join Date: Sep 2011
Posts: 5,323
Received Thanks: 3,937
Quote:
Originally Posted by xKraizy View Post
Bitte lieber erst Grundlagen lernen, bevor du an so einem Thema arbeitest. Das ist eine ganz normale Methode, die aufgerufen wird, wenn der Button "btnLogin" geklickt wurde.
Ich kann die Grundlagen^^ Naja em nur i wie gibt es nur eine Textbox (textboxQuelltext) die PW + ID beinhaltet?!

ich blick das irgendwie nicht :O
Kannste nicht vllt ein Projekt hochladen wo das drin ist?
DasSchwarzeT is offline  
Old 02/28/2012, 18:45   #21
 
Kraizy​'s Avatar
 
elite*gold: 0
The Black Market: 471/0/0
Join Date: Apr 2010
Posts: 9,696
Received Thanks: 1,811
Am Ende des Beitrags ist die gesamte Source, die man braucht, um sich einzuloggen. Wenn du das trotzdem nicht schaffst, dann kannst du die Grundlagen nicht, sry ist aber so. Und in diesem Thread geht es um WebRequests, nicht wie man irgendwelche Buttons auf die Form klatscht.
Kraizy​ is offline  
Old 03/25/2012, 09:21   #22
 
'xLeatz.'s Avatar
 
elite*gold: 0
Join Date: Nov 2011
Posts: 5,477
Received Thanks: 742
Also erstmal Super Tutorial.
Nur etz komm ich nicht weiter ich möchte das es einen Post macht, ich habes fast genau so wie beim Einloggen gemacht. Die neuen Scores mit Firefox gesucht aber es macht keinen Post.
'xLeatz. is offline  
Old 03/25/2012, 12:53   #23
 
Kraizy​'s Avatar
 
elite*gold: 0
The Black Market: 471/0/0
Join Date: Apr 2010
Posts: 9,696
Received Thanks: 1,811
Dein Code?
Kraizy​ is offline  
Old 03/25/2012, 13:12   #24
 
'xLeatz.'s Avatar
 
elite*gold: 0
Join Date: Nov 2011
Posts: 5,477
Received Thanks: 742
Code:
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Dim h As New Http
        'Posten ausführen
        textboxQuelltext.Text = h.GetResponse("http://www.elitepvpers.com/forum/newreply.php?do=postreply&t=1784743", "message=bump%3Cbr%3E&wysiwyg=1&styleid=0&signature=1&fromquickreply=1&s=&securitytoken=1332659524-11093eb9d98690c9630171388c53caf8df179273&do=postreply&t=1639683&p=who+cares&specifiedpost=0&parseurl=1&loggedinuser=4048456&sbutton=Antworten")

        textboxQuelltext.Text = h.GetResponse("http://www.elitepvpers.com/forum/")
        'prüfen, ob Post erfolgreich war
        If textboxQuelltext.Text.Contains("bump") Then
            MessageBox.Show("Post erfolgreich!")
            'Erfolgreich --> Sonst ~ Else
        Else
            MessageBox.Show("Post nicht erfolgreich!")
        End If
    End Sub
Ich muss auf die Letzte Seite vom Thread dann schauen ob dort ein Bump steht und wenn das erfolgreich ist sollte es gehen aber ka es postet nicht
'xLeatz. is offline  
Old 03/25/2012, 13:34   #25
 
Kraizy​'s Avatar
 
elite*gold: 0
The Black Market: 471/0/0
Join Date: Apr 2010
Posts: 9,696
Received Thanks: 1,811
Du loggst dich gar nicht ein..? Außerdem, warum rufst du die Hauptseite auf nachdem du versuchst einen Beitrag zu erstellen?
Kraizy​ is offline  
Old 03/25/2012, 13:41   #26
 
'xLeatz.'s Avatar
 
elite*gold: 0
Join Date: Nov 2011
Posts: 5,477
Received Thanks: 742
Doch ich logg mich schon ein das geht auch. Das ist nur der Button2 mit der Belegung zum Pushen!

Code:
rivate Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Dim h As New Http
        'Posten 
        textboxQuelltext.Text = h.GetResponse("http://www.elitepvpers.com/forum/elite-gold-trading/1639683-vk-spammer-mit-hotkeys-hot.html", "message=bump%3Cbr%3E&wysiwyg=1&styleid=0&signature=1&fromquickreply=1&s=&securitytoken=(textboxQuelltext.Text)&do=postreply&t=1639683&p=who+cares&specifiedpost=0&parseurl=1&loggedinuser=4048456&sbutton=Antworten")

        textboxQuelltext.Text = h.GetResponse("http://www.elitepvpers.com/forum/elite-gold-trading/1639683-vk-spammer-mit-hotkeys-hot.html")
        'prüfen, ob Post erfolgreich war
        If textboxQuelltext.Text.Contains("bump") Then
            MessageBox.Show("Post erfolgreich!")
            'Erfolgreich
        Else
            MessageBox.Show("Post nicht erfolgreich!")
        End If
    End Sub
'xLeatz. is offline  
Old 03/25/2012, 13:47   #27
 
Kraizy​'s Avatar
 
elite*gold: 0
The Black Market: 471/0/0
Join Date: Apr 2010
Posts: 9,696
Received Thanks: 1,811
Durch den Button2-Klick machst du aber eine neue Instanz der Http-Klasse:
Quote:
Dim h As New Http
Somit verlierst du alle Cookies und bist nicht mehr eingeloggt.
Kraizy​ is offline  
Thanks
1 User
Old 03/25/2012, 13:49   #28
 
'xLeatz.'s Avatar
 
elite*gold: 0
Join Date: Nov 2011
Posts: 5,477
Received Thanks: 742
Stimmt danke für die Hilfe!

€: Hab keine Ahnung wie ich das Fixxen kann
'xLeatz. is offline  
Old 03/25/2012, 19:43   #29
 
Kraizy​'s Avatar
 
elite*gold: 0
The Black Market: 471/0/0
Join Date: Apr 2010
Posts: 9,696
Received Thanks: 1,811
Was genau? Dass du danach noch eingeloggt bist? Erstell die Variable außerhalb des Klicks, also:

PHP Code:
Dim h As New Http

Private Sub Button1_Click...//login
   
h.GetResponse...
End Sub

Private Sub Button2_Click...//post
   
h.GetResponse...
End Sub 
Kraizy​ is offline  
Thanks
1 User
Old 07/03/2012, 08:32   #30
 
airsonic's Avatar
 
elite*gold: 2
Join Date: Jul 2011
Posts: 371
Received Thanks: 108
Hallo ich habe mir dein Tutorial angesehen und gelesen
du hast es auch wunderbar beschrieben aber ich verstehe nicht wo man seinen Namen und sein PW eingeben muss um sich einzuloggen. Ich hoffe das du mir das erklären kannst weil ich noch nicht soviel Erfahrung mit VB und anderen Sprachen hab.
airsonic is offline  
Reply


Similar Threads Similar Threads
HttpWebRequest C# Browsergame Bot
12/07/2017 - .NET Languages - 4 Replies
Hi, i have the following problem and it would be great if s.o. could help me. I try to write a simple bot for a browsergame which uses the HttpWebRequest and Response classes from C#. Currently i try to log in with the following script but i only get back to the login page. When i try to catch a site for logged in members only i also only get the login page. There has to be a problem with the cookie but i don't know where :( class HttpHelper { private CookieContainer...
c# httpwebrequest Travian
12/07/2017 - .NET Languages - 2 Replies
Gude Leute ich hätt da mal ein anliegen ich will mir ein kleines Tool zur vereinfachten bedinung von Travian schreiben nur leider bekomme ich das irgendwie nicht auf die Reihe. da mein Code nicht so recht funktioniert hat habe ich mir den code von jemand anderes mal geklaut aber der ergibt das gleiche problem. Das Probleme ist er zeigt die Seite nicht richtig an und er baut keine truppen wenn ich auf Button1 click. wenn mir einer das vielleicht mal flicken könnte oder mir erklären...
[C#]Mit HttpWebRequest auf Seite einloggen.
12/07/2017 - .NET Languages - 2 Replies
Hallo, Ich möchte mich gerne über ein Kleines Programm mit 2 Eingabefeldern und einem Login Button auf einer Seite einloggen. Mein Ziel ist es, nach dem Login die Cookies auslesen zu können, da dort für mich wichtige Infos gespeichert werden ;) using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text;
[TUTORIAL] Starter friendly tutorial to searching for Nuke casting time [TUTORIAL]
02/09/2011 - 9Dragons - 12 Replies
If you already have Cheat Engine and know how to use it, skip to part 4 of the tutorial. 1. Introduction This forum has helped me quite a bit, so I decided to give something back :) Now I've noticed there are quite a few who ask for nuke casting time hacks / address', and I've also noticed, that there are quite a few who are REALLY annoyed with these questions, so I decided to write this so both sides can benefit from it. 2. Getting started First off, you need to have Cheat Engine...
[C#]MD5-Cheksumme mit HttpWebRequest oä
08/18/2010 - .NET Languages - 1 Replies
Ich will mir mal einen gescheiten Patcher für Metin2 machen.. Jetzt soll er von den Files auf meinem Server die Checksummen ausspucken. Die Datei sollte nicht heruntergeladen werden... System.IO.FileStream FileCheck = System.IO.File.OpenRead(Dateipfad); System.Security.Cryptography.MD5 md5 = new System.Security.Cryptography.MD5CryptoServiceProvi der(); byte md5Hash = md5.ComputeHash(FileCheck);



All times are GMT +1. The time now is 15:49.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.