1

I am using python's urllib to send POST request to a PHP program:

phonehome_url = "example.com/phonehome.php"
urllib.urlopen(phonehome_url, site_info);

site_info is an array like this: [{'name': 'Technische Universitaet Muenchen', 'url': 'http://www.tum.de', 'site_id': 11599, 'longitude': 11.5669, 'login_base': 'tumple', 'latitude': 48.1493}].

But the phonehome.php receives empty $_POST. My webserver is nginx. Any idea? I already tried modify the fastcgi-params, doesn't work.


And I tried the same thing on Apache without this problem.

jdphenix
  • 15,022
  • 3
  • 41
  • 74
cinvro
  • 115
  • 1
  • 13
  • a german boy? Hallo Welt! :) how do you have configured the webserver (as a proxy)? using Rewriting (then try to ass **Query String Append** on your rules). – Adrian Preuss Mar 12 '14 at 21:08
  • :) I setup the server by using LNMP package without too much modifications, I don't know what went wrong there. – cinvro Mar 12 '14 at 21:11
  • okay. How is implementes PHP? As a Wrapper? What is then you try to make an simple POST-Request like:
    – Adrian Preuss Mar 12 '14 at 21:17
  • It will give you something like `Array ( [test] => Hello World ) ` – cinvro Mar 12 '14 at 21:31
  • Okay, then your Webserver working correctly. I think the problem is on the urrlib. Otherwise you can use cURL – Adrian Preuss Mar 14 '14 at 17:06

1 Answers1

0

Did I get it right, but normally the request type is GET. http://docs.python.org/2/library/urllib.html

viljun
  • 370
  • 3
  • 12