使用CURL命令发送POST请求并使用PHP检索

I'm trying to HTTP POST using the following command on linux

curl -X POST --data-ascii "a=hello world" http://www.mysite.com/controller/function_name

Its not working, my server is not accepting the POST at all.

My PHP code is:

<?php
print_r($_POST);
?>

whereas if I try this on my local machine it works.

For ex. curl -X POST --data-ascii "a=hello world" http://192.168.1.10/controller/function_name

Also, the server is shared host, is it a problem?

What am I doing wrong?