extracting data from a xml list inside a input to array or list php

Gardarika

New Member
im requesting data via Curl,http:// www.pro-flo.co.uk/tyre/index.phpthis is the copy ofhttp:// www.conti-tyrefinder.co.uk/index.phpon the curled page they is a input varible called "respon"the field contents xml Data, i would like to list it all rather than show the website,i created this so far and also this..http:// www.pro-flo.co.uk/tyre/findbyreg.php --- THIS IS A COPY WITH CRAP REMOVED....i want to get all that data displayed, can you guys help..the Input Field respon has this in, \[code\]<?xml version='1.0' standalone='yes'?><GEODS exp_cid='3fT0'><REQUEST type='RETURN' subtype='CALLBUR' EXP_ExperianRef='' success='Y' timestamp='Sun, 27 Jan 2013 at 11:45 AM' id='3fT0'><MB45 seq='01'><VRM>FL55AEF </VRM><ENGINECAPACITY>01598</ENGINECAPACITY><MAKE>VOLKSWAGEN </MAKE><MODEL>GOLF </MODEL><COLOUR>BLACK </COLOUR><TRANSMISSION>MANUAL 6 GEARS </TRANSMISSION><DOORPLANLITERAL>5 DOOR HATCHBACK </DOORPLANLITERAL><TRANSMISSIONCODE>M</TRANSMISSIONCODE><NUMBEROFDRDS>3</NUMBEROFDRDS><DRDITEMS><OPTION>1</OPTION><DRD>04716</DRD><TYRESIZE>195/65R15</TYRESIZE><LOADINDEX>091</LOADINDEX><SPEEDINDEX>H</SPEEDINDEX><TYREPRESSURE>2.2</TYREPRESSURE><TYREPRESSUREREAR>2.0</TYREPRESSUREREAR><RIMSIZE>6.5x15</RIMSIZE><RIMOFFSET>43</RIMOFFSET><NUTBOLTTORQUE>110</NUTBOLTTORQUE><LADENTPFRONT>2.3</LADENTPFRONT><LADENTPREAR>2.8</LADENTPREAR><WTDRVIN>1K</WTDRVIN></DRDITEMS><DRDITEMS><OPTION>2</OPTION><DRD>04713</DRD><TYRESIZE>205/55R16</TYRESIZE><LOADINDEX>090</LOADINDEX><SPEEDINDEX>V</SPEEDINDEX><TYREPRESSURE>2.0</TYREPRESSURE><TYREPRESSUREREAR>2.0</TYREPRESSUREREAR><RIMSIZE>7x16</RIMSIZE><RIMOFFSET>48</RIMOFFSET><NUTBOLTTORQUE>110</NUTBOLTTORQUE><LADENTPFRONT>2.3</LADENTPFRONT><LADENTPREAR>2.8</LADENTPREAR><WTDRVIN>1K</WTDRVIN></DRDITEMS><DRDITEMS><OPTION>3</OPTION><DRD>04714</DRD><TYRESIZE>225/45R17</TYRESIZE><LOADINDEX>090</LOADINDEX><SPEEDINDEX>V</SPEEDINDEX><TYREPRESSURE>2.0</TYREPRESSURE><TYREPRESSUREREAR>2.0</TYREPRESSUREREAR><RIMSIZE>7.5x17</RIMSIZE><RIMOFFSET>48</RIMOFFSET><NUTBOLTTORQUE>110</NUTBOLTTORQUE><LADENTPFRONT>2.3</LADENTPFRONT><LADENTPREAR>2.8</LADENTPREAR><WTDRVIN>1K</WTDRVIN></DRDITEMS></MB45></REQUEST></GEODS>\[/code\]MY SCRIPT SO FAR, \[code\] <?php$regno=$_POST['regno'];$frm_type=$_POST['frm_type'];$frm_width=$_POST['frm_width'];$frm_aspect=$_POST['frm_aspect'];$frm_rim=$_POST['frm_rim'];$frm_load=$_POST['frm_load'];$frm_speed=$_POST['frm_speed'];$frm_manufacturer=$_POST['frm_manufacturer'];$respon = $_POST['respon'];$frm_make=$_POST['frm_make'];$frm_make_check=$_POST['frm_make_check'];$frm_model=$_POST['frm_model'];$frm_model_check=$_POST['frm_model_check'];$frm_btf=$_POST['frm_btf'];$frm_btf_check=$_POST['frm_btf_check'];$frm_trim=$_POST['frm_trim'];$frm_trim_check=$_POST['frm_trim_check'];$frm_engine=$_POST['frm_engine'];$frm_engine_check=$_POST['frm_engine_check'];$frm_date=$_POST['frm_date'];$frm_date_check=$_POST['frm_date_check'];$fields = array( 'respon' => $respon, 'regno' => $regno, 'frm_type' => $frm_type, 'frm_width' => $frm_width, 'frm_aspect' => $frm_aspect, 'frm_rim' => $frm_rim, 'frm_load' => $frm_load, 'frm_speed' => $frm_speed, 'frm_manufacturer' => $frm_manufacturer, 'frm_make' => $frm_make, 'frm_make_check' => $frm_make_check, 'frm_model' => $frm_model, 'frm_model_check' => $frm_model_check, 'frm_btf' => $frm_btf, 'frm_btf_check' => $frm_btf_check, 'frm_trim' => $frm_trim, 'frm_trim_check' => $frm_trim_check, 'frm_engine' => $frm_engine, 'frm_engine_check' => $frm_engine_check, 'frm_date' => $frm_date, 'frm_date_check' => $frm_date_check); $string_fields = http_build_query($fields,"","&"); $ch = curl_init('http://www.conti-tyrefinder.co.uk/index.php'); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6"); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $string_fields); curl_setopt($ch, CURLOPT_TIMEOUT, 20); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $data = http://stackoverflow.com/questions/14547084/curl_exec($ch); $curl_errno = curl_errno($ch); $curl_error = curl_error($ch); curl_close($ch); if ($curl_errno > 0) { echo"Curl Error"; } else { echo $data; } ?>\[/code\]
 
Back
Top