You need to put the URL of the file, as if you were web requesting it, in the curl_init call - and then it will receive the POST vars. Whatever your target file outputs you will get back as the response, so you can debug that way, or use a proxy such as Wireshark or Charles to see what is being sent, or not. Hope that helps!