Hi thanx for the reply I am going to try fsockopen
Basically what I need to do is develop a way to connect to another vendors order system and post information in their system when we receive orders in our site. Problem is they expect it to come in as a file and I didn’t manage to do that. This is what I came up with so far but this does not give me a file just a post body
function runRequest($request) {
$c=curl_init();
curl_setopt($c, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($c,CURLOPT_URL,"https://example.com?id=123&pwd=123&srcFile=order");
curl_setopt($c, CURLOPT_POST, 1);
curl_setopt($c, CURLOPT_POSTFIELDS, $request);
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
$fetched=curl_exec($c);
curl_close($c);
return $fetched;
}
I am not even sure Curl is the best way to go about this.