tate_etc Posted October 17, 2007 Share Posted October 17, 2007 i need to handle CSV requests/responses for two FedEx products FedEx Web Integrated Solutions - requests are posted to a remote FedEx host FedEx Ship Manager Server - requests are posted to a local listening IP/port i have successfully posted to WIS using the cUrl method as shown: $ch = curl_init(); curl_setopt($ch, CURLOPT_PORT, $port); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_TIMEOUT, 30); curl_setopt($ch, CURLOPT_URL, $server); $reply = curl_exec($ch); curl_close($ch); echo $reply; i used the following as my vars. as you can see, i send the request to a URL: $server = "https://gatewaybeta.fedex.com/GatewayDC"; $port = "443"; $data = "csv,'data',goes,'here'"; finally, this is what i'm trying to accomplish. i would like to post a CSV transaction to a local IP/port that is running the FedEx Ship Manager like this: $server = "127.0.0.1"; $port = "2000"; $data = "csv,'data',goes,'here'"; when i use the vars above, the script times out. i have several programs that access FSMS with Java socket classes, so i know that the port is open. all of the software is hosted on the same PC, so there aren't any network issues to worry about... i would like to know if this is the proper way to submit data to a listening port via PHP. i'm not sure if i should even be using cUrl; according to the PHP manual, cUrl accepts HTTP, HTTPS, FTP, GOPHER, TELNET, DICT, FILE, and LDAP protocols. FSMS is built on Java, and there isn't very much documentation on the software (only 900 or so customers use it). does anyone have any suggestions? please help! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.