Jump to content

Objects to Strings


Guest Dagger_spell

Recommended Posts

Guest Dagger_spell

I am working on a php xml-rpc server so i am not sure if my request would be better here or in the xml. but here is the problem. I have an xml-rpc server coded and it works well with the perl client that i wrote the only problem is that the php server all it does is accept the information and place it into a mySQL database. the problem is that on number valuse i can get the inforamtion out of it but in the string values it just shows up as Object Id # and i cant seem to get the acutal string that needs to be in the database. If anyone knows how to do this please let me know I have been looking at all the documentation I can and have yet to see a way to get the information out of it here is a sample of my codewhat should be in this variable $params[0] = 'validation';$params[5] = 2;function testComplete ($params){ //Parse our Parameters. $test = $params->getparam(0); //Need something here to pul the string out $passes =$params->getparam(5); $passes = $passes->scalarval(); //this works to get integers out}I just need to know how to convert this into a string so that it will be put in the database correctlyDagger Spell

Link to comment
Share on other sites

No one can answer this, including yourself, without knowing information about the data structure that comes back from the RPC call. Use var_dump to see exactly what comes back. When you get the response back, maybe the response is stored in $params, then do something like this:var_dump($params);You will see the data type and name of whatever $params is, and whatever is in $params. The first step is to understand what data you have to work with, and we can't guess about that from the code you pasted.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...