Shoutbox

Programming "Method Post" - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Skype & Technology (/forumdisplay.php?fid=9)
+---- Forum: Tech Talk (/forumdisplay.php?fid=17)
+----- Thread: Programming "Method Post" (/showthread.php?tid=32433)

Programming "Method Post" by michael_m91 on 10-03-2004 at 04:00 AM

How do I program (In VB 6.0) to submit data to a website using Method="Post"?

I'm very confused but wan't to try none the less.


RE: Programming "Method Post" by matty on 10-03-2004 at 04:03 AM

Well you could setup the page to read data and compare it...

index.php?text=this is my text

code:
<?
echo $text;
?>

I think you can do this using the WinHTTP library but it would be easier to use a Website Control to just navigate a hidden browser on your form to that page with the text.
RE: Programming "Method Post" by michael_m91 on 10-03-2004 at 04:08 AM

quote:
Originally posted by Matty.
navigate a hidden browser on your form

Lol i thought of that but lets say... There is a text box on this hidden browser, how do i tell it to fill it then how do i tell it to click the submit button?
RE: Programming "Method Post" by matty on 10-03-2004 at 04:11 AM

I THINK its WebBrowser1.Document['textbox'] = "' I THINK, now I cant remember exactly, but its the document part of the object.


RE: Programming "Method Post" by michael_m91 on 10-03-2004 at 04:36 AM

quote:
Originally posted by Matty.
I THINK its WebBrowser1.Document['textbox'] = "' I THINK, now I cant remember exactly, but its the document part of the object.

It doesnt work, i get "Object Variable or width variable not set"

I had this line of code:
code:
MsgBox WebBrowser1.Document("username")
i did msgbox for debuging

EDIT

now i typed

code:
MsgBox WebBrowser1.Document = "username"

it says "FALSE"
RE: Programming "Method Post" by dotNorma on 10-04-2004 at 02:15 AM

code:
Private Sub Web1_DocumentComplete(ByVal pDisp As Object, URL
As Variant)
     If (pDisp Is Web1.object) Then
         While Web1.Busy
             DoEvents
         Wend
         If URL = "https://gmail.google.com/" Then
             If InStr(Web1.Document.documentElement.outerHTML, "A
Google approach to email.") <> 0 Then
                 Web1.Document.frames(0).Document.All("Email").Value =
"<Your Email>"
                 Web1.Document.frames(0).Document.All("Passwd").Value
= "<Your Pasword>"
                 Web1.Document.frames(0).Document.All("null").Click
             End If
     End If
     Exit Sub
End Sub


Here is how to log-in at the gmail page for example.
RE: Programming "Method Post" by michael_m91 on 10-04-2004 at 03:55 AM

Thanks that helped alot but im still getting errors

code:
Private Sub Form_Load()
WebBrowser1.Navigate "http://shoutbox.menthix.net/basicsearch.php"
End Sub

Private Sub Webbrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
    If (pDisp Is WebBrowser1.object) Then
        While WebBrowser1.Busy
            DoEvents
        Wend
        If URL = "http://shoutbox.menthix.net/basicsearch.php" Then
            If InStr(WebBrowser1.Document.documentElement.outerHTML, "Keywords:") <> 0 Then
                WebBrowser1.Document.frames(0).Document.All("keywords").Value = "Help"
                WebBrowser1.Document.frames(0).Document.All("Username").Value = "michael_m91"
                WebBrowser1.Document.frames(0).Document.All("null").Click
            End If
        End If
    End If
    Exit Sub
End Sub


Trying to do a Msgplus search
RE: Programming "Method Post" by WDZ on 10-04-2004 at 03:47 PM

WTF? You don't need to use POST for that. In fact, I started converting the script to pure GET.

http://shoutbox.menthix.net/basicsearch.php?do=se...keywords&uid=28611

BTW, please don't use scripts/programs to access the board in ways you weren't meant to. I'll just ban you. :p


RE: Programming "Method Post" by michael_m91 on 10-04-2004 at 07:51 PM

quote:
Originally posted by WDZ
WTF? You don't need to use POST for that. In fact, I started converting the script to pure GET.

http://shoutbox.menthix.net/basicsearch.php?do=se...keywords&uid=28611

BTW, please don't use scripts/programs to access the board in ways you weren't meant to. I'll just ban you. :p

I was trying to make a program for the search for myself so I can search from Messenger Itself.:'(

And whats this? http://shoutbox.menthix.net/basicsearch.php?do=se...keywords&uid=28611
RE: Programming "Method Post" by WDZ on 10-04-2004 at 08:00 PM

quote:
Originally posted by michael_m91
And whats this? http://shoutbox.menthix.net/basicsearch.php?do=se...keywords&uid=28611
Instead of submitting the search with a POST-method form, just open that URL! You can edit it however you want, and opening it will show you the search results. :-/
RE: Programming "Method Post" by michael_m91 on 10-04-2004 at 10:17 PM

quote:
Originally posted by WDZ
quote:
Originally posted by michael_m91
And whats this? http://shoutbox.menthix.net/basicsearch.php?do=se...keywords&uid=28611
Instead of submitting the search with a POST-method form, just open that URL! You can edit it however you want, and opening it will show you the search results. :-/

W/E I have a slightly more complicated Idea. You see i need a smaller window and no header and footer stuff the website adds. And I just need to know how to do what NoName did but for the forum.
RE: Programming "Method Post" by WDZ on 10-05-2004 at 02:42 AM

What I said about the form would still apply though... it's unnecessary and extra work to use the HTTP POST method.

I don't think you understand what you're trying to do. :p