473,386 Members | 1,715 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,386 software developers and data experts.

HTTP POST from VB app to PHP script

Hello,

I'm in the process of rewriting a program I wrote in LUA to VB.NET.
So, I am still learning the language (VB). I just have a question...

I have a windows form called "mainPage". I want to connect to the
Internet while loading. I know that I have to put the code in the Load
event for the form. Basically I want the app to send a value (latest =
1) to a remote PHP script (http://www.example.com/latest.php) using
the HTTP POST method.

I've tried using Visual Studio 2005's help topics with not luck...

I was hoping someone could help me here. Thank you.

Apr 2 '07 #1
6 9186

<ma*****@gmail.comwrote in message
news:11**********************@d57g2000hsg.googlegr oups.com...
I'm in the process of rewriting a program I wrote in LUA to VB.NET.
[Canned response]
This is a VB "classic" newsgroup. Questions about VB.NET (including VB 2005,
which has dropped .NET from its name) are off-topic here.

Please ask .NET questions in newsgroups with "dotnet" in their names. The
*.vb.* groups are for VB6 and earlier. If you don't see the *.dotnet.*
groups on your news server, connect directly to the Microsoft server:
msnews.microsoft.com.

For questions specific to the VB.NET language, use this group:
microsoft.public.dotnet.languages.vb

Please note that things like controls and data access, which have their own
subgroups in the Classic VB hierarchy, are not language-specific in .NET, so
you should look for groups like these:
microsoft.public.dotnet.framework.windowsforms.con trols
microsoft.public.dotnet.framework.adonet
(Note that "vb" is not present in the group name.)
Apr 2 '07 #2
<ma*****@gmail.comwrote in message
news:11**********************@d57g2000hsg.googlegr oups.com...
I'm in the process of rewriting a program I wrote in LUA
to VB.NET. So, I am still learning the language (VB).
You've got me confused now. That's three different languages you've quoted.

Mike
Apr 2 '07 #3
On 2 Apr, 03:27, maji...@gmail.com wrote:
Hello,

I'm in the process of rewriting a program I wrote in LUA to VB.NET.
So, I am still learning the language (VB). I just have a question...

I have a windows form called "mainPage". I want to connect to the
Internet while loading. I know that I have to put the code in the Load
event for the form. Basically I want the app to send a value (latest =
1) to a remote PHP script (http://www.example.com/latest.php) using
the HTTP POST method.

I've tried using Visual Studio 2005's help topics with not luck...

I was hoping someone could help me here. Thank you.
Hi, I had same problem.
Try to look here http://snipurl.com/1ew5a

Apr 2 '07 #4
On Apr 2, 12:46 am, "Jeff Johnson" <i...@enough.spamwrote:
<maji...@gmail.comwrote in message

news:11**********************@d57g2000hsg.googlegr oups.com...
I'm in the process of rewriting a program I wrote in LUA to VB.NET.

[Canned response]
This is a VB "classic" newsgroup. Questions about VB.NET (including VB 2005,
which has dropped .NET from its name) are off-topic here.

Please ask .NET questions in newsgroups with "dotnet" in their names. The
*.vb.* groups are for VB6 and earlier. If you don't see the *.dotnet.*
groups on your news server, connect directly to the Microsoft server:
msnews.microsoft.com.

For questions specific to the VB.NET language, use this group:
microsoft.public.dotnet.languages.vb

Please note that things like controls and data access, which have their own
subgroups in the Classic VB hierarchy, are not language-specific in .NET, so
you should look for groups like these:
microsoft.public.dotnet.framework.windowsforms.con trols
microsoft.public.dotnet.framework.adonet
(Note that "vb" is not present in the group name.)
sorry, i won't reply on microsoft.public.vb.general.discussion anymore
about vb.net
On Apr 2, 4:29 am, "Mike Williams" <m...@whiskyandCoke.comwrote:
<maji...@gmail.comwrote in message

news:11**********************@d57g2000hsg.googlegr oups.com...
I'm in the process of rewriting a program I wrote in LUA
to VB.NET. So, I am still learning the language (VB).

You've got me confused now. That's three different languages you've quoted.

Mike
sorry, i meant to right " I am still learning the language
(VB.NET)"...

On Apr 2, 3:03 pm, "Alcibiade" <panda...@libero.itwrote:
On 2 Apr, 03:27, maji...@gmail.com wrote:
Hello,
I'm in the process of rewriting a program I wrote in LUA to VB.NET.
So, I am still learning the language (VB). I just have a question...
I have a windows form called "mainPage". I want to connect to the
Internet while loading. I know that I have to put the code in the Load
event for the form. Basically I want the app to send a value (latest =
1) to a remote PHP script (http://www.example.com/latest.php) using
the HTTP POST method.
I've tried using Visual Studio 2005's help topics with not luck...
I was hoping someone could help me here. Thank you.

Hi, I had same problem.
Try to look herehttp://snipurl.com/1ew5a
sorry, i can't read italian, but thx anyway

Apr 2 '07 #5
maji wrote:
<snip>
I'm in the process of rewriting a program I wrote in LUA to VB.NET.
So, I am still learning the language (VB). I just have a question...
wellcome aboard...
I have a windows form called "mainPage". I want to connect to the
Internet while loading. I know that I have to put the code in the Load
event for the form. Basically I want the app to send a value (latest =
1) to a remote PHP script (http://www.example.com/latest.php) using
the HTTP POST method.
<snip>

To send an http request, you'll probably want to use the UploadString
method of the System.Net.WebClient class.

Note, however, that if you want your form to paint itself *before*
actually connecting the web, you'll probably prefer to send your
request from the FormShown event instead of using the Load event.

HTH.

Regards,

Branco.

Apr 3 '07 #6
Hi, I had same problem.
Try to look herehttp://snipurl.com/1ew5a

sorry, i can't read italian, but thx anyway
No problem:
in vb6 I used winsock control, in vb.net you can use tcpclient.
I sent following data(some parameters have to be changed: script path,
server path, filename, file content):

POST /www/amico.php HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/x-shockwave-flash, application/vnd.ms-excel,
application/msword, */*
Referer: http://127.0.0.1/www/
Accept-Language: it
Content-Type: multipart/form-data;
boundary=---------------------------7d52ee2010028a
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1;
..NET CLR 1.1.4322)
Host: 127.0.0.1
Content-Length: 41702
Connection: Keep-Alive
Cache-Control: no-cache

-----------------------------7d52ee2010028a
Content-Disposition: form-data; name="MAX_FILE_SIZE"

300000
-----------------------------7d52ee2010028a
Content-Disposition: form-data; name="userfile"; filename="E:
\Documents
and Settings\Evs\Desktop\157930540.jpg"
Content-Type: image/pjpeg

This is a test, I'm not a picture but only text

Apr 3 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Dave Smithz | last post by:
Hi there, I have a situation where I want to have multiple submit buttons on the same form and therefore want to use a redirection php script that checks the value associated with the submit...
2
by: yawnmoth | last post by:
i'm trying to send an http post request and see if the server got it correctly. i'm sending the http post request with this script: <? $address = 'domain.tld'; $port = 80; $proxy =...
8
by: bmgx | last post by:
I would like to use an already existing online service (currency converter) basically consisting of a html form with a few options that is submitted and returns the results. I really don't know...
3
by: Geoff | last post by:
I have been asked to add postal rates to a web page shopping cart checkout procedure. After contacting the post office I discovered that they used XML to receive postal rate requests and send back...
1
by: Aliandro | last post by:
Hi I am really stuck and need some expertise help please. I have an XML file: <XML> <USER_INFO> <USERNAME>username</USERNAME> <PASSWORD>password%</PASSWORD> </USER_INFO> <SITE_INFO>...
6
by: Phillip N Rounds | last post by:
I have a webform, from which I have to submit info to another site. Their instructions are to have a html form, with the following as the submit: <form method="post"...
4
by: Bob Bedford | last post by:
Hi all, I'm trying to submit the google sitemap after it has been created on my server with PHP. Here is the code: <?php $address= urlencode('www.mysite.com/sitemap.gz');?> <form...
6
by: Boldgeek | last post by:
I am trying to develop an app that will allow automatic updating of a web form which uses multipart/form-data enctype (as it MIGHT be sending an image) I have an example form, which when...
20
by: Lennart Anderson | last post by:
I have finally managed to get Apache 2.2.4, PHP 5.2.0 and MySQL to talk to each other. Everything seems to work OK when dealing with databases but as soon as I use a php-script that use $_server...
3
by: computer_guy | last post by:
Hi Everyone, I run into a problem. I am trying to write an aspx that can dynamically generate an image based on some input parameters. Things are very simple if the size of the parameters is...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...

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.