Remove this: <!-- Web Host Manager (c) cPanel, Inc. 2008 http://cpanel.net/ Unauthorized copying is prohibited. -->
You can't have HTML comments in XML (I'm pretty sure). Also, your & in the Query are illegal. You need to use &. Is this in a public place that I can access and look at for myself?
I disabled debugging, so Query and Raw aren't issues now.
Now all I need to do is find out how I would display this data...
Here is the script:Code:<?php header('Content-type: text/html'); echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN/\""; echo "\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">"; echo "<html><head><title>New Account</title></head>"; echo "<body>"; # cpanel12 - createacct_example.php Copyright(c) 1997-2009 cPanel, Inc. # All Rights Reserved. # copyright@cpanel.net http://cpanel.net include("xmlapi.php.inc"); $ip = "127.0.0.1"; $kh3us_pass = "**********"; $xmlapi = new xmlapi($ip); $xmlapi->password_auth("kh3us",$kh3us_pass); $xmlapi->set_debug(0); $acct = array( username => "sxmer", password => "pass123", domain => "1domain.com"); $result = $xmlapi->createacct($acct); print $result->result->rawout; print $result->result->statusmsg; echo "</body></html>" ?>
http://kh3.us/testing/cpanel/createacct_example.php
I get a 404 error when clicking your link.
Just curious, what are you making this for?
Checkout my new forum! http://adminreference.com/
My friend says that I should use preg_match on the XML rawout output to put it in an array and display it...I just read up on preg_match but I dunno how I could use it for outputting this data...
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks