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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.