post
'0', 'pwd' => '1', ); /* $pageContents = HttpClient::quickPost('http://xxxxxxxxx',$params); echo $pageContents;*/ $client = new HttpClient('xxxxxx'); $client->setDebug(true); $client->post('/action',$params); echo $client->getContent(); // foreach (json_decode($client->getContent(), true) as $item) // echo $item['name'].'
'; ?> '0', 'pwd' => '1', ); /* $pageContents = HttpClient::quickPost('http://xxxxxxxxx',$params); echo $pageContents;*/ $client = new HttpClient('xxxxxx'); $client->setDebug(true); $client->post('/action',$params); echo $client->getContent(); // foreach (json_decode($client->getContent(), true) as $item) // echo $item['name'].'
'; ?>
"; echo "asdfasdfadsf"; $mysql_server_name="xxxxx"; //數據庫服務器名稱 $mysql_username="root"; // 連接數據庫用戶名 $mysql_password="root"; // 連接數據庫密碼 $mysql_database="bookshop"; // 數據庫的名字 // 連接到數據庫 $conn=mysql_connect($mysql_server_name, $mysql_username, $mysql_password); // 從表中提取信息的sql語句 $strsql="SELECT * FROM `book`"; // 執行sql查詢 $result=mysql_db_query($mysql_database, $strsql, $conn); // 獲取查詢結果 $row=mysql_fetch_row($result); echo ''; echo ''; // 顯示字段名稱 echo ""; for ($i=0; $i'. mysql_field_name($result, $i); echo ""; } echo ""; // 定位到第一條記錄 mysql_data_seek($result, 0); // 循環取出記錄 while ($row=mysql_fetch_row($result)) { echo ""; for ($i=0; $i "; // 釋放資源 mysql_free_result($result); // 關閉連接 mysql_close($conn); ?>"; } echo ""; echo "
抓取網頁某個元素,使用simple_html_dom: