Welcome Guest, Not a member yet? Register   Sign In
Twitter and XMLRPC

Hi There,

I am attempting to-do something very simple, or so I thought - but I am having a problem, and I have a feeling this is something on my own part that I am doing wrong.

Basically, I want to learn about using API's and connecting to external services such as digg and twitter using the xmlrpc lib in CI.

I have created a basic controller and as I understood it, this would allow me to connect, is there anything strikingly wrong with this?

$server_url = "http://twitter.com/users/show/bagwaa.xml";

$this->xmlrpc->server($server_url, 80);

$request = array('http' => 'GET');

if (!$this->xmlrpc->send_request()) {
    $data["response"] = $this->xmlrpc->display_error();
} else {
    $data["response"] = $this->xmlrpc->display_response();

Apologies if this seems obvious but I just can't see the problem, and if you can point me in the right direction to figure this out it would be appreciated.


The XML you get from the twitter URL above is just plain XML, not XML-RPC.
If you want to parse the XML data, use e.g. SimpleXML.

Theme © iAndrew 2016 - Forum software by © MyBB