- Impact
- 2
Im in need of a very simple API. Its for my invoice system.
I have two identical tables, the two tables are on two different servers and more will be added.
I need to move all the rows from one table to another. This means from one server to another.
When moving a invoice (row) to the invoice server, the row must be checked (to see if it really was put into the server) before it gets deleted from Invoice Table webserver1.
This should be looped until theres no more invoices on Invoice Table1
Invoice Table Server
Collection of all invoices
Invoice Table [webserver1]
row1
row2
row3
Invoice Table [webserver2]
row1
row2
row3
There needs to be a simple encryption, i was thinking something like arrays of data, serialize them, then base64 encode them.
Then reverse it on the server and *poof* youve got the exact same array to work with!.
Server collecting data:
Invoice Table1 server sending data
You will get payd of course.
Send pm with price and msn email.
Best Regards
Jawn
I have two identical tables, the two tables are on two different servers and more will be added.
I need to move all the rows from one table to another. This means from one server to another.
When moving a invoice (row) to the invoice server, the row must be checked (to see if it really was put into the server) before it gets deleted from Invoice Table webserver1.
This should be looped until theres no more invoices on Invoice Table1
Invoice Table Server
Collection of all invoices
Invoice Table [webserver1]
row1
row2
row3
Invoice Table [webserver2]
row1
row2
row3
There needs to be a simple encryption, i was thinking something like arrays of data, serialize them, then base64 encode them.
Then reverse it on the server and *poof* youve got the exact same array to work with!.
Server collecting data:
PHP:
$data_arr = file_get_contents("http://api.invoice_server1.com/get_invoices.php?latest=100", false);
// wait for function to return the values - insert them in database
Invoice Table1 server sending data
PHP:
if ($_SERVER['REMOTE_ADDR'] != '1.1.1.1')
{
echo 'Unauthorized access.';
exit();
}
if (!ctype_digit($_GET['latest'])
{
echo 'Invalid call.';
exit();
}
$query = "SELECT * FROM tbl_invoices WHERE ID > ".$_GET['latest'];
// get data and format it as a pair of values/string to send it back
echo $formatted_data;
// don't forget to return the last invoice ID retrieved to store it in the
// collector server's database
You will get payd of course.
Send pm with price and msn email.
Best Regards
Jawn






