Time of Update: 2016-07-25
建議讀者範圍有開發經驗者。科研人員(由其Numrical)。動手能力強的。只是好奇,對於Linux只是淺嘗輒止的就不建議繼續往下看了。端正學習態度Linux不等於駭客(or Cracker)。當然眾所周知很多“駭客工具”都是Linux平台上的,我協助過很多Linux小白髮現他們殊途同歸都是朝著類似Aircrack-ng去的。但他們不知道的是:Linux只是一個工具,工具不是目的,只是手段。這一點很重要。Linux很快的完成你的需求目標。因為他是個專業層級的工具。工具跟工具之間各有利弊
Time of Update: 2016-07-25
//Unicode編碼解碼轉換function unicode_encode($name){ $name = iconv('UTF-8', 'UCS-2', $name); $len = strlen($name); $str = ''; for ($i = 0; $i { $c = $name[$i]; $c2 = $name[$i + 1]; if (ord($c) > 0) {
Time of Update: 2016-07-25
# tar zxvf httpd-2.2.6.tar.gz# cd httpd-2.2.6# ./configure --prefix=/usr/local/apache2 --enable-so --enable-track-vars --enable-proxy --enable-vhost-alias --enable-cache --enable-disk-cache --enable-mem-cache --enable-rewrite
Time of Update: 2016-07-25
[root@jbxue ~]# yum install php-gd*Setting up Install ProcessSetting up repositoriesbase 100% |=========================| 951 B 00:00update 100% |=========================| 951 B 00:00Reading
Time of Update: 2016-07-25
本文介紹下,在windows下開啟php Gd庫的方法,php GD庫在php編程中是處理影像檔一個擴充庫,非常有用,有需要的朋友參考下。方法1,根據不同的PHP版本,由於所用的PHP5解壓包已包含了GD庫,只需要在php.ini裡找到“extension=php_gd2.dll”把前面的“;”去掉即可。方法2,php中如何開啟GD庫在瀏覽器輸入啟用wamp下的GD庫(否則驗證碼可能不能用)設定檔:D:\lamp\php\php.ini 檔案如:>>> 您可能感興趣的文章:php
Time of Update: 2016-07-25
$FILENAME="image.thumb"; // 產生圖片的寬度 $RESIZEWIDTH=400; // 產生圖片的高度 $RESIZEHEIGHT=400;function ResizeImage($im,$maxwidth,$maxheight,$name){ $width = imagesx($im); $height = imagesy($im); if(($maxwidth && $width > $maxwidth) || ($maxheight && $height > $
Time of Update: 2016-07-25
defaults('ADMIN_USERNAME','apc'); // Admin Usernamedefaults('ADMIN_PASSWORD','password'); // Admin Password - CHANGE THIS TO ENABLE!!!複製代碼3、apc使用樣本apc使用起來非常簡單,看下面的幾個增加、查詢、修改、刪除樣本。1)、增加一個緩衝,有效時間為3600秒apc_add('name', 'tom', 3600);執行代碼,然後查看User
Time of Update: 2016-07-25
imagecolorallocatealpha //分配顏色 + alphaimagesavealpha //設定在儲存 png 映像時儲存完整的 Alpha 色板資訊複製代碼完整代碼: //擷取源圖gd映像標識符$srcImg = imagecreatefrompng('./src.png');$srcWidth = imagesx($srcImg);$srcHeight = imagesy($srcImg);//建立新圖 bbs.it-home.org$newWidth =
Time of Update: 2016-07-25
header("Content-type: text/html; charset=utf8");/* * 提交請求* @param $header array 需要配置的網域名稱等header設定 array("Host: devzc.com");* @param $data string 需要提交的資料 'user=xxx&qq=xxx&id=xxx&post=xxx'....* @param $url string 要提交的url
Time of Update: 2016-07-25
/** * GD image text outer * * @copyright UGiA.CN * [url=home.php?mod=space&uid=17823]@LINK[/url] www.ugia.cn/?p=88 * @edit bbs.it-home.org */function imagetextouter(&$im, $size, $x, $y, $color, $fontfile, $text, $outer){ if
Time of Update: 2016-07-25
[root@jbxue ~]# rpm -qa | grep zlibzlib-1.2.1.2-1.2zlib-devel-1.2.1.2-1.2You have new mail in /var/spool/mail/root複製代碼不存在的話,請手動下載編譯:http://ishare.iask.sina.com.cn/f/15275772.html tar zxvf zlib-1.2.2.tar.gz cd zlib-1.2.2 ./configure make make
Time of Update: 2016-07-25
/**php匯入csv檔案到資料庫****同時計算程式執行時間***///定義擷取時間函數 function getmicrotime(){ list($usec, $sec) = explode(" ",microtime()); return ((float)$usec + (float)$sec); }$time_start = getmicrotime();include("db.inc.php");//串連資料庫$db=new testcsv;$handle =
Time of Update: 2016-07-25
[root@jbxue ~]# rpm -qa|grep phpphp-pear-1.4.6-2php-5.1.2-5php-gd-5.1.2-5php-ldap-5.1.2-5複製代碼2、卸載以上列出的RPM包: [root@jbxue ~]# rpm -e php-pear-1.4.6-2 php-5.1.2-5 php-gd-5.1.2-5 php-ldap-5.1.2-5複製代碼3、進入/var/php目錄: [root@jbxue ~]# cd
Time of Update: 2016-07-25
# tar xvzf zlib-1.2.3.tar.gz# cd zlib-1.2.3# ./configure# make && make install複製代碼3、安裝freetype # tar xvzf freetype-1.3.1.tar.gz# cd freetype-1.3.1# ./configure --prefix=/usr/local/freetype# make && make install 複製代碼有多行錯誤類似:ftdump.c:172:1: error:
Time of Update: 2016-07-25
$imageurl = 'http://127.0.0.1/1.png';$headers = get_headers($imageurl); 複製代碼其實圖片也是本地的一張圖片,但是確實是“遠程”的,遠程圖片也可以理解為url地址的圖片。使用抓包工具tcpdump監聽本地80連接埠: sudo tcpdump -i lo -nnA 'src port 80'複製代碼而後訪問test.php,抓到的包關鍵區段如下:可以看到圖片的內容也被請求回來了。最終確定下來get_headers是GET請求,
Time of Update: 2016-07-25
$str = '我是誰'; //gbk編碼的字串echo mb_substr($str, 0, 1, 'gbk'); //輸出 我 複製代碼mb_substr方法比substr多一個參數,用來指定字串編碼。2,utf-8編碼截取中文字串的例子。 $str = '我abc是誰'; //utf-8編碼的字串echo mb_substr($str, 0, 2, 'utf-8'); //輸出 我a
Time of Update: 2016-07-25
本文介紹下,在php中匯入與匯出excel檔案的辦法,使用phpexcel或Spreadsheet_Excel_Writer類匯出excel檔案,並介紹了匯出csv檔案的三種方法。一、PHP匯出Excel檔案1,推薦phpexcel,官方網站: http://www.codeplex.com/PHPExcel匯入匯出都成,可以匯出office2007格式,同時相容20032、使用pear的Spreadsheet_Excel_Writer類下載地址:
Time of Update: 2016-07-25
$fp = fsockopen("www.baidu.com", 80, $errno, $errstr, 30);if ($fp) { //這裡請求設定為HEAD就行了 $out = "HEAD /img/baidu_sylogo1.gif HTTP/1.1\r\n"; $out .= "Host: www.baidu.com\r\n"; $out .= "Connection: Close\r\n\r\n"; fwrite($fp, $out);
Time of Update: 2016-07-25
/*** 遠程圖片的下載* by bbs.it-home.org*/header("Content-type:text/html ; charset=utf-8"); if (!empty($_POST['submit'])){ $url = $_POST['url']; $pictureName = $_POST['pictureName']; $img = getPicture($url,$pictureName); echo '';}function
Time of Update: 2016-07-25
$authnum=''; $ychar="0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z"; $list=explode(",",$ychar);//分割函數 for($i=0;$i$randnum=rand(0,35); $authnum.=$list[$randnum];//以數組的形式輸出複製代碼方法二,定義為一個私人函數。 private function createCheckCode()