Solved

Cobbler XMLRPC calls with PHP

Posted on 2011-03-03
6
563 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Windows 10 linux VM 30 90
Securing source code... theoretical question 10 45
bash: ./Facebooker.pl :Permission Denied 9 48
How do I init a PHP page jusing JQuery? 8 18
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 i…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

738 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