First, realize that the language you use is immaterial to the problem. You should know exactly what you're putting on the wire (the URL, headers, and JSON body) and that falls outside of PHP. A fundamental part of debugging is separating your code from the HTTP traffic itself.
Second, if posting code please always highlight it using the Advanced Editor's syntax highlighter.
Third, if it's really true that "the code works fine outside [y]our company network" this is a job for your IT crew, not for the Community, since they likely have you going through an HTTP proxy.