[eluser]ezafy[/eluser]
I am new to php and xml-rpc and I spend like 4 hours on this so far and no luck yet
youtube requires request like this:
Code:
<?xml version='1.0'?>
<methodCall>
<methodName>youtube.users.get_profile</methodName>
<params>
<param><value><struct>
<member>
<name>dev_id</name>
<value><string>YOUR_DEV_ID</string></value>
</member>
<member>
<name>user</name>
<value><string>YOUTUBE_USER_NAME</string></value>
</member>
</struct></value></param>
</params>
</methodCall>
but whatever i do I can not get CI's xml-rpc to produce the
<name> tag
what is wrong with my code or is it not possible?
Code:
<?php
class Welcome extends Controller {
function Welcome()
{
parent::Controller();
$this->load->library('xmlrpc');
}
function index()
{
$this->xmlrpc->set_debug(TRUE);
$this->xmlrpc->server('http://www.youtube.com/api2_xmlrpc');
$this->xmlrpc->method('youtube.users.get_profile');
$request = array(
"dev_id" => array('My_DEV_ID', 'string'),
"user" => array('My_USER_ID', 'string')
# array('user', 'string'),
# array('dev_id', 'string')
);
$this->xmlrpc->request($request);
$this->xmlrpc->display_response();
if(! $this->xmlrpc->send_request())
{
echo $this->xmlrpc->display_error();
}
}
}
?>
THANK YOU VERY MUCH