Example #1
0
    //	$content = addslashes($content);
    echo $content . "\n\n";
    $ptype = addslashes($ptype);
    $ptime = time();
    $hostname_conn = "mysql1403.ixwebhosting.com:3306";
    $database_conn = "C360953_fangjun";
    $table_comm = "jzw";
    $username_conn = "C360953_fangjun";
    $password_conn = "Fangjun65320";
    $conn = @mysql_connect($hostname_conn, $username_conn, $password_conn);
    if ($conn) {
        mysql_select_db($database_conn, $conn);
        mysql_query("set names 'utf8'");
        //database operation
        $sql = "INSERT INTO {$table_comm} (content,ptime)VALUES('{$content}', FROM_UNIXTIME({$ptime}) )";
        if (!mysql_query($sql, $conn)) {
            //	die("failed to insert data error:".mysql_error());
        } else {
        }
        mysql_close($conn);
    } else {
        //	die("failed to open database error:".mysql_error());
    }
}
set_time_limit(0);
//getjoke(1000);
getjokes(200);
//insertkepumsg();
//echo getkepu();
getEnglish();
Example #2
0
/**
 *  获取用户列表数组
 */
function getUserList($arr)
{
    $length = count($arr);
    $user = array();
    if ($length) {
        foreach ($arr as $id => $ordinal) {
            array_push($user, getEnglish($ordinal[0]));
        }
    }
    return $user;
}