Click to See Complete Forum and Search --> : Auto POST
tommynanda
03-25-2006, 05:44 PM
Is there a way to Auto POST form data?
we can append values to URL for GET method, is there a similar way to work with POST method? with out any user intervention.
MarkR
03-25-2006, 06:02 PM
It's not at all clear how exactly, you're trying to do an auto-post.
Yes of course you can. If you're talking about a cron job, or some other autonomous task, you can use the stream_context_create to supply post data for use when you can fopen() on your URL. If you're using some other language, such as perl, or shell script, you could use libwww-perl or curl command line to achieve a POST.
Mark
tommynanda
03-25-2006, 06:16 PM
Okay let me explain this a little bit more...
I am trying to write a VB Windows Applicaton that uses a webbrowser control to hit a ASP .NET page. I want to Upload a file to this ASP .NET webpage with out user intervention. Yes, I can use winsocks, but I want to try something different. How can a client send a file with out clicking on any upload button or etc.
I was thinking something like: client sending FileName-Path to a ASP .NET page using GET method and this page should in turn go back to client and get the file in the filepath.
am I making any sense?
It doesnt have to be ASP .NET, PHP is fine too. But the big question here I guess is not server side scripting.
Weedpacket
03-26-2006, 01:15 AM
Most AJAX libraries include code for constructing http POST requests and submitting them. A lazier way of doing it would be for Javascript to construct a hidden form with a POST method, fill it out, and submit it. That would cause a page refresh of course, which may or may not be desirable. Except....
I want to Upload a file to this ASP .NET webpage with out user intervention.would probably cause security hassles. A lot of people really do not like the idea of having random web sites pulling arbitrary files off their local harddrive without their say-so. For obvious reasons. Any system that allows it would have to be considered vulnerable and in need of fixing.
tommynanda
03-26-2006, 08:31 PM
I agree with you on the security vulnerability.
JavaScript idea sounds good... I'll try if I can send a Button Send MESSAGE through javascript
PHP Builder
Copyright WebMediaBrands Inc. All Rights Reserved.