Re: create pop account via fsockopen...

From: Date: Fri, 25 Jul 2003 16:33:44 +0000
Subject: Re: create pop account via fsockopen...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-156893@lists.php.net to get a copy of this message
* Thus wrote Brian McGarvie (brian.mcgarvie@anypurposeloans.co.uk): > All, > > I'm having trouble creating an pop account usaign fsockopen(), here is whaty > I have... is connects ok but does not seem to execite the GET. > > $fp = fsockopen ($host, 2082,$errno,$errstr); is this the right port? > if (!$fp) { > echo "$errstr ($errno)<br>\n"; > } else { > $authstr = "$cpaneluser:$cpanelpass"; > $pass = base64_encode($authstr); > $in = "GET > /frontend/$cpaneltheme/mail/doaddpop.html?email=$newuser&domain=$domain&pass > word=$mpassword&quota=$quota\r\n HTTP/1.0\r\nAuthorization: Basic $pass\r\n > "; > fputs($fp, $in); > fclose ( $fp ); > echo "<center>ACCOUNT CREATED</center>"; Are you sure it was? Absolutely no error checking, what is the result code back from the server? did the fputs work? > } Curt -- "I used to think I was indecisive, but now I'm not so sure."

« previous php.general (#156893) next »