To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here
PHPBuilder.com  
 

 

Go Back   PHPBuilder.com > Misc Help > ClientSide Technologies

ClientSide Technologies Discuss HTML/CSS/Javascript, and any other client-side technologies, here.

Reply
 
Thread Tools Rate Thread Display Modes
Old 03-25-2006, 05:44 PM   #1
tommynanda
Senior Member
 
tommynanda's Avatar
 
Join Date: Aug 2003
Posts: 330
Auto POST

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.
__________________
Warning: Cannot modify header information - headers already sent
tommynanda is offline   Reply With Quote
Old 03-25-2006, 06:02 PM   #2
MarkR
Senior Member
 
Join Date: Jul 2004
Location: Oxford, England
Posts: 1,983
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
MarkR is offline   Reply With Quote
Old 03-25-2006, 06:16 PM   #3
tommynanda
Senior Member
 
tommynanda's Avatar
 
Join Date: Aug 2003
Posts: 330
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.
__________________
Warning: Cannot modify header information - headers already sent
tommynanda is offline   Reply With Quote
Old 03-26-2006, 01:15 AM   #4
Weedpacket
Custom User Title™
 
Weedpacket's Avatar
 
Join Date: Aug 2002
Location: Rapid Offensive Unit "Foreign Object Damage"
Posts: 19,124
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....
Quote:
Originally Posted by tommynanda
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.
__________________
On two occasions I have been asked [by Members of Parliament], "Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?" I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.
Weedpacket is offline   Reply With Quote
Old 03-26-2006, 08:31 PM   #5
tommynanda
Senior Member
 
tommynanda's Avatar
 
Join Date: Aug 2003
Posts: 330
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
__________________
Warning: Cannot modify header information - headers already sent
tommynanda is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes 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
Forum Jump


All times are GMT -4. The time now is 08:59 PM.






Acceptable Use Policy

internet.comMediabistrojusttechjobs.comGraphics.com

WebMediaBrands Corporate Info


Advertise | Newsletters | Feedback | Submit News

Legal Notices | Licensing | Permissions | Privacy Policy


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.