Format PHP Soap request

  php, soap

I’ve made a PHP SOAP request, the request returns a complete dump of the contents, How do I format it ? Never used xml or PHP,SOAP before this ? The code

<?php  

$client = new SoapClient('http://www.autobid.co.za/halfway/vehicledetails.php?wsdl');
  
 $result = $client->getVehicleDetails('spwf87','hk8*9jd'); 

 echo('<p>'.$result.'</p>');

?>


Returns:

5002386176AHTHA3CD503427515BPSSZN1GD058155439845.00WHITE2019TOYOTAHILUX 2.8 GD-6 RAIDER 4X4 A/T P/U D/C60039521Full Service History with agentsSigns of cosmetic workhttp://www.autobid.co.za/images/image_5002386176.jpghttp://www.autobid.co.za/images/image_5002386176_1.jpghttp://www.autobid.co.za/images/image_5002386176_2.jpghttp://www.autobid.co.za/images/image_5002386176_3.jpghttp://www.autobid.co.za/images/image_5002386176_4.jpg541000.00541000.00Black leatherSpare Key: Yes,Bin Liner: Yes,Leather Seats: Yes,Tonneau Cover: Yes,Rollbar: Yes,Towbar: Yes,Bullbar: Yes,Other Extras/Comments: WHEEL ARCHES SIDE VISORS,5002371142AHTBB0JE400024849NX423391ZRV93623779342.00WHITE2019TOYOTACOROLLA 1.6 PRESTIGE CVT60027544Full Service History with agentsSigns of cosmetic workhttp://www.autobid.co.za/images/image_5002371142.jpghttp://www.autobid.co.za/images/image_5002371142_1.jpghttp://www.autobid.co.za/images/image_5002371142_2.jpghttp://www.autobid.co.za/images/image_5002371142_3.jpghttp://www.autobid.co.za/images/image_5002371142_4.jpg220000.00220000.00BlackSpare Key: Yes,5002366129AAVZZZ6SZBU019983ND606937CLP043956108334.00SILVER2011VOLKSWAGENPOLO VIVO 1.4 TRENDLINE TIP 5DR64020120Full Service History agent & non-agentSigns of cosmetic workhttp://www.autobid.co.za/images/image_5002366129.jpghttp://www.autobid.co.za/images/image_5002366129_1.jpghttp://www.autobid.co.za/images/image_5002366129_2.jpghttp://www.autobid.co.za/images/image_5002366129_3.jpghttp://www.autobid.co.za/images/image_5002366129_4.jpg75000.0075000.00GreySpare Key: Yes,5002364072JTMZ43FV70D511939ND842882M20AV1456899963.00WHITE2020TOYOTARAV4 2.0 GX CVT60077613Not due for service yetSigns of cosmetic workhttp://www.autobid.co.za/images/image_5002364072.jpghttp://www.autobid.co.za/images/image_5002364072_1.jpghttp://www.autobid.co.za/images/image_5002364072_2.jpghttp://www.autobid.co.za/images/image_5002364072_3.jpghttp://www.autobid.co.za/images/image_5002364072_4.jpg416000.00416000.00Black5002357702AHTLB52E003096386ND1467581ZRV044055127338.00WHITE2015TOYOTACOROLLA QUEST 1.660010250Full Service History with agentsSigns of cosmetic

I need it in a better formatted method rather than just a dump like that, never used SOAP nor PHP before this so got it to this point but want a better representation of the data now, please assist if you can,much appreciated!

Source: Ask PHP

LEAVE A COMMENT