Here is a PHP QuickBooks Library which does exactly what you want to do.
You should follow the QuickBooks PHP Web Connector quick-start guide to get started. You'll want to architect your application so that your PHP script can receive the data, store it temporarily in a database (MySQL, etc.) and then the Web Connector can pick up the data destined for QuickBooks from there.
The Web Connector is a little different than a standard web service in that it works in a sort of backwards manner - the Web Connector will call out to your PHP web service vs. you calling out to it.
There's a overview of how the Web Connector works over here.
You should refer to this script (as the quick-start guide does above):
You'll end up writing functions to generate qbXML requests that look something like this:
<?php
/**
* Example Web Connector application
*
* This is a very simple application that allows someone to enter a customer
* name into a web form, and then adds the customer to QuickBooks.
*
* @author Keith Palmer <[email protected]>
*
* @package QuickBooks
* @subpackage Documentation
*/
/**
* Generate a qbXML response to add a particular customer to QuickBooks
*/
function _quickbooks_customer_add_request($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale)
{
// Grab the data from our MySQL database
$arr = mysql_fetch_assoc(mysql_query("SELECT * FROM my_customer_table WHERE id = " . (int) $ID));
$xml = '<?xml version="1.0" encoding="utf-8"?>
<?qbxml version="2.0"?>
<QBXML>
<QBXMLMsgsRq onError="stopOnError">
<CustomerAddRq requestID="' . $requestID . '">
<CustomerAdd>
<Name>' . $arr['name'] . '</Name>
<CompanyName>' . $arr['name'] . '</CompanyName>
<FirstName>' . $arr['fname'] . '</FirstName>
<LastName>' . $arr['lname'] . '</LastName>
</CustomerAdd>
</CustomerAddRq>
</QBXMLMsgsRq>
</QBXML>';
return $xml;
}