• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 606
  • Last Modified:

Cobbler XMLRPC calls with PHP

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
jaxstorm
Asked:
jaxstorm
  • 4
1 Solution
 
Beverley PortlockCommented:
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
 
jaxstormAuthor Commented:
Yeah I removed the actual URL for privacy reasons.
0
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

 
jaxstormAuthor Commented:
I already have xmlrpc installed
0
 
jaxstormAuthor Commented:
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
 
jaxstormAuthor Commented:
Found my own solution
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now