溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

使用php設(shè)計簡單驗證碼

發(fā)布時間:2020-06-11 17:26:07 來源:網(wǎng)絡(luò) 閱讀:331 作者:凡瑟爾 欄目:web開發(fā)

2017,1,3,星期二

  一、所需的代碼,步驟:

    1.新建畫布[新建圖像]

    resource p_w_picpathcreatetruecolor ( int $width , int $height );

    2.選取顏色

    int p_w_picpathcolorallocatealpha ( resource $p_w_picpath , int $red , int $green , int $blue , int $alpha );

    3.畫圖

    bool p_w_picpathellipse ( resource $p_w_picpath , int $cx , int $cy , int $width , int $height , int $color )

    4.區(qū)域填充

    bool p_w_picpathfill( resource $p_w_picpath   , int $x   , int $y   , int $color );

    5.生成隨機數(shù)

    int mt_rand( int $min, int $max );

    6.隨機打亂一個字符串

    string str_shuffle( string $str );

    7.用 TrueType 字體向圖像寫入文本

    array p_w_picpathttftext ( resource $p_w_picpath , float $size , float $angle  , int $x  , int $y , int $color , string $fontfile  , string $text  );

    8.返回字符串的子串

    string substr ( string $string, int $start[, int $length  ] )

    9.發(fā)送原生 HTTP 頭

    void header ( string $string [, bool $replace = true [, int $http_response_code ]] );

    10.以 PNG 格式將圖像輸出到瀏覽器或文件

    bool p_w_picpathpng ( resource $p_w_picpath [, string $filename ] );

    11.銷毀一圖像

    bool p_w_picpathdestroy  ( resource $p_w_picpath );

向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI