function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
MrdiniMrdini 

PHP 4 - what options?

Yo,

Currently poking around a bit at the WSDL stuff etc, and have to ask...

If we're still using PHP4, what options do we have? (I notice PHP5 has more support for SOAP, than PHP4 *sighs* Can't really upgrade right now)

Gist of what we currently do...
We use a perl-ified web-to-case cronjob to read user stuff from our database, & sumbit it to salesforce. We get duplicates this way, unfortunately.

Gist of what we'd like to do...
Keep a record of customers data in Salesforce. New customers gets sent straight to SF.com - no problem there. EXISTING customers however - would use WSDL(? any other ways?) to interrogate the Salesforce database, and then append the new information to that user info.
ClaiborneClaiborne

With PHP 4 (hopefully 4.3 or later), you have a couple of options with SOAP.

You can add SOAP as a capability by adding the appropriate PEAR library.

Or you can just add NuSOAP.php as an included file in the proper location. There are a couple of modifications that need to be made to NuSoap, but there is a file on this board somewhere where a SFDC engineer did the work. If not, I can provide you with information on my hacked approach.

As for updating your client database, you should use the new "Upsert" command with a foreign ID value. When a record is "upserted", it looks for a match on the foreign ID. If a match is found, it updates the record. If no match is found, it inserts a new record. The foreign ID would be a unique indentifier you maintain in your non-SFDC customer database.

MrdiniMrdini
Hi,

Yeah, I decided on PEAR::SOAP, as it seemed the simplest to install (PEAR install SOAP-x.x.x & voila!).

As for upsert, this would certainly come in handy, once I get PEAR::SOAP up and running(!).

Many thanks!