Here is solution
This is just for testing.
include this anywhere you want it
let's say checkout_process.php of oscommerce catalog
Anytime this php script gets called it will create a customer in A2billing
You have to have matching e-product created in A2billing productid=1
<?php
require "notify.php";
$go='key=xxxx&productid=1&forceid=&lastname=Callabress&firstname=Jordia&
[email protected]';
fsockPost('http://www.xxx.com/A2Billing_UI/api/api_ecommerce.php',$go);
?>
create a new file
notify.php
<?
function fsockPost($url,$data) {
//Parse url
$web=parse_url($url);
//Set the port number
if($web[scheme] == "https") {
$web[port]="443";
$ssl="ssl://";
} else {
$web[port]="80";
}
//Create socket connection
$fp=@fsockopen($ssl . $web[host],$web[port],$errnum,$errstr,30);
//Error checking
if(!$fp) {
echo "Can't open socket to remote addr ($errnum): $errstr - please check your webserver configuration!<br>Connect str: $ssl . $web[host],$web[port],30<br>URL: $url<br>";
} else { //Posting Data
fputs($fp, "POST $web[path] HTTP/1.1\r\n");
fputs($fp, "Host: $web[host]\r\n");
fputs($fp, "Content-type: application/x-www-form-urlencoded\r\n");
fputs($fp, "Content-length: ".strlen($data)."\r\n");
fputs($fp, "Connection: close\r\n\r\n");
fputs($fp, $data . "\r\n\r\n");
//loop through the response from the server
while(!feof($fp)) {
$info[]=@fgets($fp, 1024);
}
//close fp - we are done with it
fclose($fp);
//break up results into a string
$info=implode(",",$info);
}
return $info;
}
?>