Closed Thread
Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15

Thread: XML Result from PHP?

  1. #11
    Jordan Guest

    Re: XML Result from PHP?

    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 &amp;. Is this in a public place that I can access and look at for myself?

  2. CODECALL Circuit advertisement

     
  3. #12
    Ricardo-san is offline Learning Programmer
    Join Date
    Jan 2009
    Posts
    54
    Rep Power
    12

    Re: XML Result from PHP?

    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...
    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>"
    ?>
    Here is the script:
    http://kh3.us/testing/cpanel/createacct_example.php

  4. #13
    Jordan Guest

    Re: XML Result from PHP?

    I get a 404 error when clicking your link.

  5. #14
    phpforfun's Avatar
    phpforfun is offline Speaks fluent binary
    Join Date
    Feb 2008
    Posts
    1,232
    Blog Entries
    17
    Rep Power
    24

    Re: XML Result from PHP?

    Just curious, what are you making this for?
    Checkout my new forum! http://adminreference.com/

  6. #15
    Ricardo-san is offline Learning Programmer
    Join Date
    Jan 2009
    Posts
    54
    Rep Power
    12

    Re: XML Result from PHP?

    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...

Closed Thread
Page 2 of 2 FirstFirst 12

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Java Result Sets
    By chili5 in forum Java Tutorials
    Replies: 11
    Last Post: 01-07-2011, 05:03 PM
  2. display result in 4 columns
    By the jil in forum PHP Development
    Replies: 3
    Last Post: 01-26-2010, 06:07 AM
  3. paginating search result
    By balamberas in forum PHP Development
    Replies: 5
    Last Post: 01-15-2010, 12:19 PM
  4. why the result is backwards...
    By noteeth in forum C and C++
    Replies: 4
    Last Post: 10-10-2009, 12:43 PM
  5. Replies: 22
    Last Post: 11-08-2008, 12:15 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts