delete subdomains with httpsocket class

mmgenius

Verified User
Joined
Jan 20, 2004
Messages
180
i'm trying to delete a subdomain with the httpsocket class but that don't work. Has anyone a solution? this is my script:

$sock->query("/CMD_SUBDOMAIN?domain=$domain&action=delete&select1=$oldSubdomein&contents=yes&delete='Delete Selected'");

$result = $sock->fetch_parsed_body();
 
Before that $sock->query you probably need a:
Code:
$sock->set_method('POST');
Should work.
 
I tried pasting the query in my adresfield of internet explorer, and when i do this, he said he can't find the page, but when i look in direct domain the subdomain is gone.
 
Yes, I see. You need to seperate the "file" and the "query string" bits:
Code:
$sock->query("/CMD_SUBDOMAIN","domain=$domain&action=delete&select1=$oldSubdomein&contents=yes&delete=Delete Selected");
Or this even works:
Code:
$sock->query("/CMD_SUBDOMAIN",array( 'domain' => $domain, 'action' => 'delete', 'select1' => $oldSubdomein, 'contents' => 'yes', 'delete' => 'Delete Selected' ));
 
Back
Top