Solved

Cobbler XMLRPC calls with PHP

Posted on 2011-03-03
6
549 Views
Last Modified: 2012-05-11
I'm trying to do some very simple xmlrpc calls with Cobbler, a Redhat management system.

The problem is, the documentation is in pythong and I'm pretty new to PHP. The info for xmlrpc on python is here:

https://fedorahosted.org/cobbler/wiki/CobblerXmlrpc

I've posted my PHP code in the code box, am I even remotely close to the correct syntax here?
<?php
include 'xmlrpc.inc';

// Make an object to represent our server.
$server = new xmlrpc_client('https://url/cobbler/cobbler_api');

$token = $server->login("username","password");

echo $server->getprofiles("name");

?>

Open in new window

0
Comment
Question by:jaxstorm
  • 4
6 Comments
 
LVL 34

Expert Comment

by:Beverley Portlock
ID: 35029311
Your syntax looks OK on a casual inpection, but that URL needs to change https://url/cobbler/cobbler_api is not a valid web url. You can use localhost

https://localhost/cobbler/cobbler_api

I can't help yu much with RPC, but that's not what you were asking about...    :-)

0
 
LVL 8

Author Comment

by:jaxstorm
ID: 35029707
Yeah I removed the actual URL for privacy reasons.
0
 
LVL 3

Expert Comment

by:pius_babbun
ID: 35034041
0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
LVL 8

Author Comment

by:jaxstorm
ID: 35037195
I already have xmlrpc installed
0
 
LVL 8

Accepted Solution

by:
jaxstorm earned 0 total points
ID: 35055926
I found the solution, I need to utilise an better XMRPC library, I went for intuitio and used their example and it now works.
0
 
LVL 8

Author Closing Comment

by:jaxstorm
ID: 35115110
Found my own solution
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now