02-07-2014
Quote:
Originally Posted by
Corona688
All web page queries end up downloading something. That also uploads a POST query too, namely, "field1=value1&field2=value2".
You did change this to your needs, yes?
You did check your server for the necessary results, yes?
Yes, i changed it to match my form field names and the file it downloaded is just php file with html content (source code) i dont know how more i can check results.
i found that in the form is another field like:
<input type="hidden" name="hobby" value="football">
but i did not mention this field in my command, not sure if its correct
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a custom HTML form that has a couple radio buttons and a text field that requires a number.
I'm not a php programmer and could use some help with putting together php code to calculate a total based on the radio button selection and the text field number.
... (3 Replies)
Discussion started by: nck
3 Replies
2. Shell Programming and Scripting
I'm trying to use wget to submit a form. I have tried to dig out what is actually being "posted" and where, using tamperdata (see below).
http://ubuntuforums.org/attachment.php?attachmentid=109123&d=1239224127
Here is my wget command:
wget --http-user=xyz --http-password=xyz... (1 Reply)
Discussion started by: mike909
1 Replies
3. Shell Programming and Scripting
Hi
i have a file which have a pattern like this
Nov 10 session closed
Nov 10 Nov 9 08:14:27 EST5EDT 2010 on tty .
Nov 10 Oct 19 02:14:21 EST5EDT 2010 on pts/tk .
Nov 10 afrtetryytr
Nov 10 session closed
Nov 10 Nov 10 03:21:04 EST5EDT 2010
Dec 8 Nov 10 05:03:02 EST5EDT 2010
... (13 Replies)
Discussion started by: Himanshu_soni
13 Replies
4. Shell Programming and Scripting
I am trying to write a shell script to use curl in order to automate downloading data from a website. The URL with the post form is here: http://try-db.org/de/InfoBySpecies.php .
I have a list of about 1800 different species I want to check. For Example, choose the first species and use the... (2 Replies)
Discussion started by: hansvg
2 Replies
5. Shell Programming and Scripting
hello
my script is submitting POST-data to a site
(its not my first script, i've done these before many times (include parsing scripts) but this one is tough)
so the problem is i'm submitting a form with firefox
and in firebug i see WHAT exactly i'm submitting
then
when i do EXACTLY the... (28 Replies)
Discussion started by: tip78
28 Replies
6. Shell Programming and Scripting
Hi,
I want to write a small code in which script changes command line input to some form.
Example
script.sh a1 a2 a3 a4 .....
output should be "a1|a2|a3|....."
Number of inputs in command line can be any variable (2 Replies)
Discussion started by: Raza Ali
2 Replies
7. Shell Programming and Scripting
so i have a bit of a unique situation.
i have an encrypted index.php file that that can't be run the normal way that a web browser would run it. if it is run the normal way, the php script will show only gibberish on the web browser, instead of the actual php code.
when run from the command... (8 Replies)
Discussion started by: SkySmart
8 Replies
8. Programming
hi all,
im going to design a web html form so users can input what username and password they want to make the ftp account, once they enter in a username and password they click on the submit button and it submits it to a bash script and then the bash script will run and finish of making the... (3 Replies)
Discussion started by: robertkwild
3 Replies
9. Shell Programming and Scripting
Hi All,
I'm new in forum.
Many congratulations to everyone for all work.
I'm not an expert in bash script
I've a problem with a sh file.
The sh file run every t minuts and it read data from txt file and then compile form.
Finally, the user, from the web browser click on send.
The script... (0 Replies)
Discussion started by: Herbert
0 Replies
10. Shell Programming and Scripting
Hi I was hoping some one could help me with a problem I have.
I am trying to collect some information from a web form and save it to a text file.
I found an example on this site that is sort of what I am trying to accomplish, the shell script bellow should echo the input back to the browser... (0 Replies)
Discussion started by: Paul Walker
0 Replies
LEARN ABOUT DEBIAN
ns_connclearquery
Ns_ConnGetQuery(3aolserver) AOLserver Library Procedures Ns_ConnGetQuery(3aolserver)
__________________________________________________________________________________________________________________________________________________
NAME
Ns_ConnGetQuery, Ns_ConnClearQuery, Ns_ConnGetFile, Ns_ConnFirstFile, Ns_ConnNextFile - Routines to access query data included with a con-
nection request
SYNOPSIS
#include "ns.h"
Ns_Set *
Ns_ConnGetQuery(Ns_Conn *conn)
void
Ns_ConnClearQuery(Ns_Conn *conn)
Ns_ConnFile *
Ns_ConnGetFile(Ns_Conn *conn, char *file)
Ns_ConnFile *
Ns_ConnFirstFile(Ns_Conn *conn, Tcl_HashSearch *searchPtr)
Ns_ConnFile *
Ns_ConnNextFile(Ns_Conn *conn, Tcl_HashSearch *searchPtr)
ARGUMENTS
Ns_Conn *conn (in) Pointer to given connection.
char *file (in) Name of embedded file.
Tcl_HashSearch *searchPtr (in/out) Pointer to buffer to maintain state of an active search.
_________________________________________________________________
DESCRIPTION
These routines provide access to connection query data, derived from either URL query arguments (i.e., key/value pairs after the ? in an
URL) or via an HTTP POST. The server supports ordinary URL encoded forms as well as multipart/form-data forms which may include one or
more embedded files.
As form processing is a common and important aspect of dynamic web applications, AOLserver provides easy access to the query data within
the core. The parsing occurs on demand and the results are cached for reuse throughout the connection; there is no need to copy the
returned Ns_Set or Ns_ConnFile structure(s). The results of these routines should be considered read-only.
Ns_Set *Ns_ConnGetQuery(conn)
Returns a pointer to an Ns_Set with the fields of the connection query or NULL if no valid query was present. The keys and values
are in UTF-8, decoded from the request based on the server urlencoding config option. Subsequent calls to Ns_ConnGetQuery will
return the same set unless the server detects the connection encoding has changed in which case the previous query is cleared and a
new query result is generated.
Data for the query is based on any URL query arguments which may be present (i.e., key/value pairs following the ? in the URL). If
there is no URL query data, the server will parse the content of an HTTP POST.
void Ns_ConnClearQuery(conn)
Frees the previous parsed query, if any. There is normally no need to call this routine as it is called automatically at the end of
a connection if necessary. It is normally only called internally when Ns_ConnGetQuery detects the url encoding has been manually
updated for the connection, potentially invalidating the character encoding on the previous form parsing.
Ns_ConnFile *Ns_ConnGetFile(file) Returns the Ns_ConnFile structure for the given file if present which includes the following fields:
typedef struct Ns_ConnFile {
char *name;
Ns_Set *headers;
off_t offset;
off_t length;
} Ns_ConnFile;
The name field is a pointer to a string which matches the name as provided by the corresponding form <input> tag. The headers field is a
pointer to an Ns_Set with the key/value pairs for the file input meta data, e.g., a Content-Type header. The offset and length fields
specfy where within the content the actual file bytes are located. See the Ns_ConnContent man page for details on accessing the content
bytes either through an in-memory buffer or open temp file.
Ns_ConnFirstFile and Ns_ConnNextFile routines allow you to manage a search through the underlying hash table of uploaded files.
EXAMPLE
Given the following HTML form:
<form enctype=multipart/form-data method=post>
<textarea name=stringdata></textarea>
<input type=file name=filedata>
<input type=submit>
</form>
the following code would dump the form strings and file info to the server log:
void
DumpQuery(Ns_Conn *conn)
{
Ns_Set *query;
Ns_ConnFile *filePtr;
Tcl_HashSearch search;
query = Ns_ConnGetQuery(conn);
if (query != NULL) {
/* Dump key/values of all fields. */
Ns_SetPrint(query);
/* Dump info on each embedded file. */
filePtr = Ns_ConnFirstFile(conn);
while (filePtr != NULL) {
Ns_Log(Notice, "file: %s %d %d", filePtr->name,
filePtr->offset, filePtr->length);
filePtr = Ns_ConnNextFile(conn);
}
}
}
SEE ALSO
Ns_Set(3), Ns_Conn(3), Ns_ConnContent(3), ns_conn(n), ns_parsequery(n)
KEYWORDS
form, query
AOLserver 4.5 Ns_ConnGetQuery(3aolserver)