Score:0

RApache get Query String from executing URL - howto?

pw flag

I would like to get the query string from the executing URL into my R. I've installed and configured R Apache. Everything works to this extend.

My R code so far is:

query_string <- Sys.getenv("QUERY_STRING")
cat("Content-Type: text/html\r\n\r\n")
cat("Die Anfrage-URL ist:", query_string)

I get no information from QUERY_STRING. Why? Any tipps and tricks?

My executing URL is http://localhost/R/query.R?query=hello

I would like to extract "hello".

Score:0
pw flag

It turned out that there is a far more simpler approach.

Just use GET, POST, COOKIES, FILES or SERVER.

When using RApache, you get GET, POST, COOKIES, FILES, SERVER variables which are passed on to the script.

args <- GET
 
print(args[1])
print(args[2])
print(args[3])

http://[ip address]/R/query.R?query=people&word=hello&verb=Simon

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.