Forums Forums (
-   Scripting / API (
-   -   PHP (

raf_root4ce 02-01-2006 03:05 PM

Where can i find more examples on how to use API output to perfom actions via PHP?

thnx in advance?

Igor 02-01-2006 03:12 PM

is ISPmanager documentation not suffice ?

raf_root4ce 02-01-2006 03:30 PM

Yes but a few examples on how to add users and/or mail aliasses for example might be handy :)

Igor 02-01-2006 03:49 PM


  $result = "";
  $fh = fopen( "", "r" );
  while( $data = fread( $fh, 4096 ) ){
    $result .= $data;
  fclose( $fh );

  // After that the variable $result contains XML document with one node <ok/> or error codes and messages

this document
describe all API functions and parameters.

raf_root4ce 02-03-2006 11:45 AM

I use the code u provided but i can't get it to work.
I think it has something to do with authentication but when i Fetch the url from the shell the account is being created.

I think i'm just doing something wrong in PHP
Can you tell me the way to do authentication with PHP so i can verify if i'm doing it correct?


Igor 02-03-2006 01:08 PM

what is in $result variable after request ?

raf_root4ce 02-03-2006 05:40 PM

$result has
Permission denied error code

Igor 02-04-2006 04:03 AM

are run script as user root ?

02-04-2006 07:28 PM

It's embedded in a php-webpage with global execution permission

Igor 02-06-2006 03:21 AM

do you want anybody may do anything on your server ?

certenly it not works.

you should run this php script from shell as user root.

or your script should have authorization information.
add parameter authinfo=root:rootpassword in the request.
but i should notice it is insecure.

All times are GMT +2. The time now is 10:05 PM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2022, vBulletin Solutions, Inc.