PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Cesar D. Rodas   PHP poppassd client   example.php   Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example
Class: PHP poppassd client
Change password of users with poppassd protocol
Author: By
Last change: * Made visible without user login
Date: 17 years ago
Size: 520 bytes
 

Contents

Class file image Download
<?php
/*
 * PHP popassd client.
 *
 * This class allow PHP communicate witha PopPass server and changes the password
 * of mail users.
 *
 * The author disclaims the copyright over this class.
 *
 * Cesar D. Rodas
 * saddor@gmail.com
 */
include("poppassd.php");
$c = new poppassd("crodas","actual_password","new_password", "server.url.or.ip.com");
$err = $c->changePasswd();
if (
$err != PASS_CHANGED){
    echo
"Error: ".$c->errorMessage($err);
} else {
    echo
"Password changed!";
}
?>