We will need more to go on, like what is the full and exact output displayed on the screen when you run that code? What is does var_dump($user_data); show?
Normally if the data you are sending is incorrect, you would get a detailed error message as to why that is the case. Because you are not receiving that, its likely that something larger is wrong, such as invalid URL, API key/SessionID, or the end-point you are calling into is incorrect.
The api/json/api_client_example.php script will work against our public demo instance of TimeTrex. So you should be able to use that to create a test schedule if you like.