PC Review


Reply
Thread Tools Rate Thread

Can you 'post' a web form from a stand-alone application.

 
 
KC
Guest
Posts: n/a
 
      24th May 2004
I want to submit an HTTP request to a site but the site needs to think it's
being POSTed from a form. How do I do that?

--

--------
Ken Hunt
678-644-6036


 
Reply With Quote
 
 
 
 
Chad Z. Hower aka Kudzu
Guest
Posts: n/a
 
      24th May 2004
"KC" <(E-Mail Removed)> wrote in news:(E-Mail Removed):
> I want to submit an HTTP request to a site but the site needs to think it's
> being POSTed from a form. How do I do that?


http://www.indyproject.org/

www.atozed.com/indy has an HTTP demo. It shows GET, but POST is just another
method with similar arguments.


--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"

Empower ASP.NET with IntraWeb
http://www.atozed.com/IntraWeb/
 
Reply With Quote
 
Mythran
Guest
Posts: n/a
 
      24th May 2004
Imports System.Net

Module Module1

Sub Main()
Dim request As HttpWebRequest =
HttpWebRequest.Create("http://www.google.com")
Dim response As HttpWebResponse
Dim postData As String = "q" & ChrW(61) & "Sample Criteria"
Dim bytes As Byte() = System.Text.ASCIIEncoding.ASCII.GetBytes(postData)
Dim output As IO.Stream

request.Method = "POST"
request.ContentType = "application/x-www-form-urlencoded"
request.ContentLength = postData.Length

output = request.GetRequestStream()
output.Write(bytes, 0, bytes.Length)
output.Close()

End Sub

End Module


"KC" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I want to submit an HTTP request to a site but the site needs to think it's
> being POSTed from a form. How do I do that?
>
> --
>
> --------
> Ken Hunt
> 678-644-6036
>
>



 
Reply With Quote
 
KC
Guest
Posts: n/a
 
      24th May 2004
Many thanks!

Ken

P.S. I'm still in the beat-your-head-against-the-wall-to-do-simple-things
stage.


"Mythran" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Imports System.Net
>
> Module Module1
>
> Sub Main()
> Dim request As HttpWebRequest =
> HttpWebRequest.Create("http://www.google.com")
> Dim response As HttpWebResponse
> Dim postData As String = "q" & ChrW(61) & "Sample Criteria"
> Dim bytes As Byte() =

System.Text.ASCIIEncoding.ASCII.GetBytes(postData)
> Dim output As IO.Stream
>
> request.Method = "POST"
> request.ContentType = "application/x-www-form-urlencoded"
> request.ContentLength = postData.Length
>
> output = request.GetRequestStream()
> output.Write(bytes, 0, bytes.Length)
> output.Close()
>
> End Sub
>
> End Module
>
>
> "KC" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > I want to submit an HTTP request to a site but the site needs to think

it's
> > being POSTed from a form. How do I do that?
> >
> > --
> >
> > --------
> > Ken Hunt
> > 678-644-6036
> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Post server side form to different application Sudheer Aalla Microsoft ASP .NET 2 6th Oct 2005 04:17 PM
Stand alone Application =?Utf-8?B?UnVkaQ==?= Microsoft Access 7 20th Apr 2005 12:43 PM
2nd Post - Disable Stand By Russell Windows XP General 1 21st Sep 2004 09:39 PM
2nd Post - Disable Stand By =?Utf-8?B?SmV0?= Windows XP General 0 21st Sep 2004 07:17 PM
Re: 2nd Post ...... Turn Off.....Stand By Malke Windows XP General 0 19th Aug 2004 06:52 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:00 PM.