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
Solved

Cobbler XMLRPC calls with PHP

Posted on 2011-03-03
6
554 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
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
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…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

829 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