Jump to content

xml-rpc to mysql


neorf

Recommended Posts

hi, i need to do an xml-rpc to a server and then put the data into mysql db.

the end of my script is:

....

//send msg

$r=$c->send($f);

 

$data=utf8_decode($r->serialize());

 

//print array

print_r($data);

 

I get data, but all data is serialized. I need to separe every info to insert in my db. How can i do?

The request is for hotel details, so as answer from xml-rpc server i've many hotel details: hotelname1 imagehotel1 hotelname2 imagename2 etc...

I need to insert every hotelnameX into name... etc...

i hope to have expa

 

Thanks

 

neorf

 

Link to comment
https://forums.phpfreaks.com/topic/79293-xml-rpc-to-mysql/
Share on other sites

the response is this:

 

district nr_rooms 20 city Rome checkin to from 14:00 minrate 60 hotel_id 81970 url http://www.booking.com/hotel/it/angelhotel.html district nr_rooms 10 city Venice checkin to 00:00 from 13:00 minrate 88 hotel_id 80687 url http://www.booking.com/hotel/it/hotelbridge.html

 

 

i've just to separate info after every main tag, bolded one. can i use explode or other similar?

thanks

 

 

Link to comment
https://forums.phpfreaks.com/topic/79293-xml-rpc-to-mysql/#findComment-401362
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.