post

What is the best way to upload a file via an HTTP POST with a web form?

Basically, something better than this: <input type="file" name="myfile" size="50"> First of all, the "browse" button looks different on every browser. Unlike the "submit" button on a form, you have to come up with some hack-y way to style it. Secondly, there's no progress indicator showing you how much of the file has uploaded. ...

Passing $_POST values with cURL

How do you pass $_POST values to a page using cURL? ...

Security advice for jquery ajax data post?

Hi, I'm using jquery ajax to post updates back to my server. I'm concerned about making sure I have put in place appropriate measures so that only my AJAX calls can post data. My stack is PHP on Apache against a MySQL backend. Advice greatly appreciated! ...

When do you use POST and when do you use GET?

From what I can gather, there are three categories - never use GET and use POST, never use POST and use GET, and it doesn't matter which one you use. Am I correct in assuming those three cases? If so, what are some examples from each case? ...

PHP Multiform Validation and Redirection

I have buy.php with a form where you enter items, quantity, shipping data, etc. When you click the Submit button, it posts back to buy.php ($_SERVER['PHP_SELF']) and does some data validation. If there are fields missing or errors, they are highlighted. If everything is correct, I save the $_POST data in $_SESSION variables, then do a he...

jQuery ajax $.post successfull ?

I'm trying to figure the result of this call if it was successful or not. The successFunction doesn't get called so i'm assuming it was not. How do i know what went wrong? xmlRequest = $.post("/url/file/", { 'id' : object.id }, successFunction, 'json'); Do i use the xmlRequest object? ...

Parsing HTTP Headers

I've had a new found interest in building a small, efficient web server in C and have had some trouble parsing POST methods from the HTTP Header. Would anyone have any advice as to how to handle retrieving the name/value pairs from the "posted" data? POST /yeah HTTP/1.1 Host: cor.cs.uky.edu:7017 User-Agent: Mozilla/5.0 (Windows; U; Wind...

How would one log into a phpBB3 forum through a Python script using urllib, urllib2 and ClientCookie?

(ClientCookie is a module for (automatic) cookie-handling: http://wwwsearch.sourceforge.net/ClientCookie) # I encode the data I'll be sending: data = urllib.urlencode({'username': 'mandark', 'password': 'deedee'}) # And I send it and read the page: page = ClientCookie.urlopen('http://www.forum.com/ucp.php?mode=login', data) output = pa...

Python and POST data

In PHP I simply write: $bob = $_POST['bob']; How do I do the same in Python? And yes, I do normally check that it exists etc, I'm just stripping it down specifically to the functionality I am after. Edit: I am not using a framework ...

Problem POSTing to webservice in .net 3.5 solution

I'm at my wit's end here. I'm trying to use an auto-complete extender from the asp.net ajax extensions toolkit, which is filled from a bog-standard webservice. The application is a .net 3.5 web site, hosting the webservice in a subdirectory (real, not virtual). Whenever I try to post to the webservice I get the following error: The HTT...

Javascript Post Request like a Form Submit

I'm trying to direct a browser to a different page. If I wanted a GET request, I might say document.location.href = 'http://example.com/q=a'; But the resource I'm trying to access won't respond properly unless I use a POST request. If this were not dynamically generated, I might use the HTML <form action="http://example.com/" method=...

Send file using POST from a Python script

This is an almost-duplicate of http://stackoverflow.com/questions/68477/send-file-using-post-from-a-python-script, but I'd like to add a caveat: I need something that properly handles the encoding of fields and attached files. The solutions I've been able to find blow up when you throw unicode strings containing non-ascii characters into...

What is the preferred way to redirect a request in Pylons without losing form data?

I'm trying to redirect/forward a Pylons request. The problem with using redirect_to is that form data gets dropped. I need to keep the POST form data intact as well as all request headers. Is there a simple way to do this? ...

How can I send an HTTP POST request to a server from Excel using VBA?

What VBA code is required to peform an HTTP POST from an Excel spreadsheet? Accepted Answer Note: For greater control over the HTTP request you can use "WinHttp.WinHttpRequest.5.1" in place of "MSXML2.ServerXMLHTTP" ...

How do I prevent ServerXMLHTTP from automatically following redirects (HTTP 303 See Other responses)?

I am using ServerXMLHTTP to perform an HTTP POST. The response returned is a redirect (specifically 303 See Other). ServerXMLHTTP is automatically following this redirect but this is causing an authentication failure as is not propagating the Authorization header of the original request. Is there a way I can prevent the automatic redire...

How do you post to an Iframe?

How do you post data to an iframe? ...

Sensible HTTP POST timeout values to use when programmatically issuing requests?

When programmatically issuing HTTP POST requests, what timeout values would be sensible? In my case, I'm looking to set 'sensible' timeout values when making POST requests in PHP, however this applies to any language. I need to be able to issue a set of requests, each to a user-specified URL. If I do need to process requests consecutiv...

HTML: POST for images?

Hello, I am working on a web-application in which dynamically-created images are used to display information. This data is currently sent to the images using a GET query-string but with more complex images and data I am worried about running into problems with the url character limit. I could simply pass the record ID to the image and h...

POST multiple parameters

I am changing a GET to a POST. Currently I have .jsp?id=a,b,c,d. When changing this to a post I am still sitting the id parameter a,b,c,d . This is not working for me. Can I submit a comma separated list to a post parameter? ...

Javascript Post on Form Submit open a new window

http://stackoverflow.com/questions/133925/javascript-post-request-like-a-form-submit shows you how to submit a form that you create via JavaScript via post. Below is my modified code. var form = document.createElement("form"); form.setAttribute("method", "post"); form.setAttribute("action", "test.jsp"); var hidden...