Current location: Hot Scripts Forums » Programming Languages » PHP » posting php to xml


posting php to xml

Reply
  #1 (permalink)  
Old 10-19-09, 09:50 AM
IFS IFS is offline
New Member
 
Join Date: Oct 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
posting php to xml

Required Fields:

- Title

- Firstname

- Lastname

- ID

- We also need at least 1 contact number.



Validation:

- No numeric or special characters to be sent through firstname or lastname.

- ID must have 13 numeric values no letters or special characters.

- Contact number must be numeric and not have special characters or spaces.

- Telephone number. The area code must be 3 digits and number must be 7.

- Mobile number must be 10 digits.

- Email must only allow @_.- to be accepted no other special characters.



XML, replace VALUES as required.

<?xml version="1.0" encoding="UTF-8"?>

<lead>

<mode>TEST</mode> keep as TEST only change if directed

<title>TITLE</title> Mr, Mrs, Miss, Dr, Prof are the only values we currently accept

<firstname>FIRSTNAME</firstname>

<lastname>LASTNAME</lastname>

<id>ID</id> Will help with validation and reducing duplicate leads

<homecode>HOMECODE</homecode>

<hometel>HOMETEL</hometel>

<workcode>WORKCODE</workcode>

<worktel>WORKTEL</worktel>

<mobile>MOBILE</mobile>

<email>EMAIL</email>

<comment>COMMENT</comment>

<source>RATESDIRECT</source> This identifies your source

<notes></notes> Leave blank

<language>E</language> E – English (default), A – Afrikaans

<product>PRODUCT</product> P – Personal (Default), B – Business

</lead>



The above XML can then be posted to https://www.outsurance.co.za/OLL/goleadtest.asp a XML response will be then be returned.

The XML should be posted in a variable called lead and the XML also needs to be URLencoded.



<?xml version="1.0" encoding="UTF-8"?>

<response>

<resultNo><resultNo> -1 if an error occurred. 0 is successful

<resultMsg></resultMsg> On success returns reference number for the lead generated.

</response>



These are the possible returned values for resultMsg



None specified – default value will only be returned if nothing happens. Please contact us if this is returned

Could not load XML – if there is a problem with the received xml

Successfull Test – only applies to TEST and is returned if everything is received correctly

A technical error has occurred while checking the ID Number. – ID could not to validated

A technical error has occurred while loading lead. – Server side code error.

ExistingClient – this client is already on our books

CancelledClient – we have this client on our books but has cancelled his policy

ExistingQuote – has a quote less than 186 days old

6 digit number (Reference Number) – system generated lead number

this is what I need to do, I have been struggling with this for the past 2 weeks now and NO progress someone please help, by tomorrow if possible.

Last edited by IFS; 10-19-09 at 09:53 AM.
Reply With Quote
  #2 (permalink)  
Old 10-19-09, 10:24 AM
Nico's Avatar
Nico Nico is offline
Community Leader
 
Join Date: Sep 2005
Location: Spain
Posts: 8,075
Thanks: 11
Thanked 88 Times in 83 Posts
No one is going to do this for free... and especially not until tomorrow.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
XML PHP MYSQL- Writing to a xml file punky79 PHP 8 05-18-09 04:21 AM
XML Data to DAtabse using PHP sms_josh PHP 7 09-08-08 08:50 AM
xml to mysql using php - urgent mianriz PHP 1 12-21-06 03:51 PM
post XML data using PHP MszUser PHP 5 06-09-05 04:37 AM
Syndicating XML data into a website using PHP... Jackal05 PHP 3 07-16-04 02:38 PM


All times are GMT -5. The time now is 08:01 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.