PHP, post, mysql connection, webpage capturing

Source: Internet
Author: User

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'].'
';?>

Mysql connection:

 "; Echo" asdfasdfadsf "; $ mysql_server_name =" xxxxx "; // database server name $ mysql_username =" root "; // database connection username $ mysql_password =" root "; // database connection password $ mysql_database = "bookshop"; // database name // connect to the database $ conn = mysql_connect ($ mysql_server_name, $ mysql_username, $ mysql_password ); // SQL statement for extracting information FROM the table $ strsql = "SELECT * FROM 'book'"; // execute an SQL query $ result = mysql_db_query ($ mysql_database, $ strsql, $ conn); // get the query result $ row = mysql_fetch_row ($ result); echo ''; echo'
 
  '. Mysql_field_name ($ result, $ I); echo"";} Echo"
 
 
  
'; Echo $ row [$ I]; echo'';} Echo"
 
 
 
  
  
'; // Display the field name echo"
  
  
     "; For ($ I = 0; $ I 
   "; // Locate the first record mysql_data_seek ($ result, 0); // retrieve record cyclically while ($ row = mysql_fetch_row ($ result) {echo" 
   
     "; For ($ I = 0; $ I 
   ";} Echo" 
  
"; Echo" "; // release the resource mysql_free_result ($ result); // close the connection mysql_close ($ conn);?>

Webpage Capture:

 
Capture an element of a webpage and use simple_html_dom:



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.