[OpenSourceProject] Talk2Me Bot

Page 2 of 2 FirstFirst 12
Results 16 to 18 of 18
  1. #16
    The Gamma..? EliteGM is offline
    MemberRank
    Jul 2006 Join Date
    NandolandLocation
    4,078Posts

    Re: [OpenSourceProject] Talk2Me Bot

    UPDATED Human :

    PHP Code:
       <?php
    class Human
    {
        var 
    $First;
        var 
    $Name;
        var 
    $Middle;
        var 
    $Last;
        var 
    $Sex;
        var 
    $Age;
            
        function 
    Human($first$middle$last$sex$age)
        {
            
    $this->Name   $first;
            
    $this->First  $first;
            
    $this->Middle $middle;
            
    $this->Last   $last;
            
    $this->Sex    $sex;
            
    $this->Age    $age;
        }
        
        function 
    Human_fullName()
        {
            if (empty(
    $this->Middle))
            {
                
    $fullName $this->First .' '$this->Last;
            } else {
                
    $fullName $this->First .' '$this->Middle .' '$this->Last;
            }
            return 
    $fullName;
        }
        
        function 
    Human_show($name$sex$age)
        {
            
    $fullName $this->Human_fullName();
            echo 
    '<h3><i>About Me..</i></h3>';
            echo 
    '<p>My name is '.$fullName.', you can call me '.$name.' for short.';
            echo 
    '<br>';
            echo 
    'I am '.$age.' years old.';
            echo 
    '<br>';
            echo 
    'You probably already know due to my name, but I happen to be a '.$sex.'.</p>';
        }
        
        function 
    Human_update_show($first$middle$last$sex$age
        {
            echo 
    '<form action="'.$_SERVER['PHP_SELF'].'" method="post">';
                echo 
    '<table border="0">';
                echo 
    '<td>First Name: </td><td><input name="name" value="'.$first.'" type="text" /></td></tr>';
                echo 
    '<tr><td>Middle Name: </td><td><input name="mname" value="'.$middle.'" type="text" /></td></tr>';
                echo 
    '<tr><td>Last Name: </td><td><input name="lname" value="'.$last.'" type="text" /></td></tr>';
                echo 
    '<tr><td>Age: </td><td><input name="age" value="'.$age.'" type="text" /></td></tr>';
                echo 
    '<tr><td>Gender: </td>';
                echo 
    '<td><select name="sex" selected="'.$sex.'">';
                echo 
    '<optgroup label="Gender">';
                echo 
    '<option value="Male">Male</option>';
                echo 
    '<option value="Female">Female</option>';
                echo 
    '</optgroup>';
                echo 
    '</select>';
                echo 
    '</td></tr>';
                echo 
    '<tr><td></td><td><input type="submit" name="create" value="Update Human!" /></td></tr>';
                echo 
    '</table>';
            echo 
    '</form>';
        }
    }

    if (
    $_POST['create'])
    {
        
    $Human = new Human($_POST['name'], $_POST['mname'], $_POST['lname'], $_POST['sex'], $_POST['age']);
    } else {
        
    $Human = new Human('Bob''''Bobkinsons''Male'22);
    }

    $Human->Human_show($Human->Name$Human->Sex$Human->Age);
    $Human->Human_update_show($Human->First$Human->Middle$Human->Last$Human->Sex$Human->Age);

    ?>

  2. #17
    Account Upgraded | Title Enabled! andrew951 is offline
    MemberRank
    Dec 2006 Join Date
    207Posts

    Re: [OpenSourceProject] Talk2Me Bot

    i think posting ftp details wasnt such a good idea. everything got deleted. lol.

  3. #18
    :-) s-p-n is offline
    DeveloperRank
    Jun 2007 Join Date
    Next DoorLocation
    2,098Posts

    Re: [OpenSourceProject] Talk2Me Bot

    free host shut me down ;)

    and FTP details was for the open source testing section. You couldn't update the actual 'talk2mebot.freehostia.com' root, only the 'talk2mebot.freehostia.com/openSource/' folder.

    But once I looked at their terms, it strictly prohibits any bot making. so yeah.. that's why they shut it down



Page 2 of 2 FirstFirst 12

Advertisement