PDA

View Full Version : Problem showing user package.


overhosted
03-27-2004, 03:13 PM
Hello all,

I am using the phpclass of l0rdphi,

with this code(script called da.php):
<?php

include 'httpsocket.php';

$sock = new HTTPSocket;

$sock->connect('https://notimportant.',2222);
$sock->set_login('admin','noway....');

$sock->query('/CMD_API_PACKAGES_USER');
$result = $sock->fetch_parsed_body();

print_r($result);
print_r($sock->error);
?>



But it gives this error:

Array ( ) Array ( [0] => 0 - )

Does anyone have a idea?

I would be most gratefull!

Thank you,

Kevin Overtoom

l0rdphi1
03-27-2004, 04:58 PM
Hello,

You're using an HTTPS connection. Do you have OpenSSL complied into PHP? (see this (http://www.directadmin.com/forum/showthread.php?postid=15388#post15388) for how.)

Besides that, once OpenSSL works, you may need to use ssl:// in place of https://

Let us know how it goes.

overhosted
03-28-2004, 02:16 AM
Well, you were right about the https (programming late isn't good). I just use http

But it still gives the same error.

But thanks for the tip.

overhosted
03-28-2004, 06:47 AM
humm if i enter http://myip:2222/CMD_API_PACKAGES_USER
it shows my packages but not with the code.

I am missing a array or something?

Thanks,

Kevin

overhosted
03-28-2004, 11:42 AM
Nevermind, i solved it, when i was reading your class again lordphi,

Thanks,

Kevin:p