Solved

Cobbler XMLRPC calls with PHP

Posted on 2011-03-03
6
547 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
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
The viewer will learn how to count occurrences of each item in an array.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

706 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

17 Experts available now in Live!

Get 1:1 Help Now