php curlµÄ¼¸¸öÀý×Ó
ʹÓÃPHPµÄcURL¿â¿ÉÒÔ¼òµ¥ºÍÓÐЧµØÈ¥×¥ÍøÒ³¡£ÄãÖ»ÐèÒªÔËÐÐÒ»¸ö½Å±¾£¬È»ºó·ÖÎöÒ»ÏÂÄãËùץȡµÄÍøÒ³£¬È»ºó¾Í¿ÉÒÔÒÔ³ÌÐòµÄ·½Ê½µÃµ½ÄãÏëÒªµÄÊý¾Ý
ÁË¡£ÎÞÂÛÊÇÄãÏë´Ó´ÓÒ»¸öÁ´½ÓÉÏÈ¡²¿·ÖÊý¾Ý£¬»òÊÇÈ¡Ò»¸öXMLÎļþ²¢°ÑÆäµ¼ÈëÊý¾Ý¿â£¬ÄÇžÍÊǼòµ¥µÄ»ñÈ¡ÍøÒ³ÄÚÈÝ£¬cURL ÊÇÒ»¸ö¹¦ÄÜÇ¿´óµÄPHP¿â¡£
PHPÖеÄCURLº¯Êý¿â£¨Client URL Library Function£©
curl_close — ¹Ø±ÕÒ»¸öcurl»á»°
curl_copy_handle — ¿½±´Ò»¸öcurlÁ¬½Ó×ÊÔ´µÄËùÓÐÄÚÈݺͲÎÊý
curl_errno — ·µ»ØÒ»¸ö°üº¬µ±Ç°»á»°´íÎóÐÅÏ¢µÄÊý×Ö±àºÅ
curl_error — ·µ»ØÒ»¸ö°üº¬µ±Ç°»á»°´íÎóÐÅÏ¢µÄ×Ö·û´®
curl_exec — Ö´ÐÐÒ»¸öcurl»á»°
curl_getinfo — »ñÈ¡Ò»¸öcurlÁ¬½Ó×ÊÔ´¾ä±úµÄÐÅÏ¢
curl_init — ³õʼ»¯Ò»¸öcurl»á»°
curl_multi_add_handle — ÏòcurlÅú´¦Àí»á»°ÖÐÌí¼Óµ¥¶ÀµÄcurl¾ä±ú×ÊÔ´
curl_multi_close — ¹Ø±ÕÒ»¸öÅú´¦Àí¾ä±ú×ÊÔ´
curl_multi_exec — ½âÎöÒ»¸öcurlÅú´¦Àí¾ä±ú
curl_multi_getcontent — ·µ»Ø»ñÈ¡µÄÊä³öµÄÎı¾Á÷
curl_multi_info_read — »ñÈ¡µ±Ç°½âÎöµÄcurlµÄÏà¹Ø´«ÊäÐÅÏ¢
curl_multi_init — ³õʼ»¯Ò»¸öcurlÅú´¦Àí¾ä±ú×ÊÔ´
curl_multi_remove_handle — ÒƳýcurlÅú´¦Àí¾ä±ú×ÊÔ´ÖеÄij¸ö¾ä±ú×ÊÔ´
curl_multi_select — Get all the sockets associated with the cURL extension, which can then be "selected"
curl_setopt_array — ÒÔÊý×éµÄÐÎʽΪһ¸öcurlÉèÖûỰ²ÎÊý
curl_setopt — Ϊһ¸öcurlÉèÖûỰ²ÎÊý
curl_version — »ñÈ¡curlÏà¹ØµÄ°æ±¾ÐÅÏ¢
curl_init()º¯ÊýµÄ×÷Óóõʼ»¯Ò»¸öcurl»á»°£¬curl_init()º¯ÊýΨһµÄÒ»¸ö²ÎÊýÊÇ¿ÉÑ¡µÄ£¬±íʾһ¸öurlµØÖ·¡£
curl_exec()º¯ÊýµÄ×÷ÓÃÊÇÖ´ÐÐÒ»¸öcurl»á»°£¬Î¨Ò»µÄ²ÎÊýÊÇcurl_init()º¯Êý·µ»ØµÄ¾ä±ú¡£
curl_close()º¯ÊýµÄ×÷ÓÃÊǹرÕÒ»¸öcurl»á»°£¬Î¨Ò»µÄ²ÎÊýÊÇcurl_init()º¯Êý·µ»ØµÄ¾ä±ú¡£
Àý×ÓÒ»: »ù±¾Àý×Ó
»ù±¾Àý×Ó﹤?php
// ³õʼ»¯Ò»¸ö cURL ¶ÔÏó
$curl = curl_init();
// ÉèÖÃÄãÐèҪץȡµÄURL
curl_setopt($curl, CURLOPT_URL, 'http://www.cmx8.cn');
// ÉèÖÃheader
curl_setopt($curl, CURLOPT_HEADER, 1);
// ÉèÖÃcURL ²ÎÊý£¬ÒªÇó½á¹û±£´æµ½×Ö·û´®Öл¹ÊÇÊä³öµ½ÆÁÄ»ÉÏ¡£
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
// ÔËÐÐcURL£¬ÇëÇóÍøÒ³
$data = curl_exec($curl);
// ¹Ø±ÕURLÇëÇ
Ïà¹ØÎĵµ£º
<?
//ÐÂÎÅÀà±ð
$query_cat="select * from $dbtable1";
$result_cat=mysql_query($query_cat) or die("<mce:script type="text/javascript"><!--
alert('Ìáʾ£º²éÑ°ÐÂÎÅÀà±ðʧ°Ü£¬Çë¸ú¹ÜÀíÔ±ÁªÏµ')
// --></mce:script>");
if(!$resul ......
linuxÖÐÉý¼¶phpºÍGD¿â±Ê¼Ç
php-5.1.2.tar.gz
°²×°phpËùÐèµÄÈí¼þ°ü
£¨ÆäÖÐlibxml2ÊÇ°²×°php5±ØÐëµÄ£¬ÎªÊ²Ã´»¹ÐèÒªperl´ô»á˵Ã÷ÔÒò¡££©
libxml2-2.6.19.tar.gz
libxslt-1.1.15.tar.gz
ActivePerl-5.8.8.817-i686-linux-2.2.17-gcc-257965.rpm
curl-7.15.0.tar.gz
GD¿âËùÐèÒªÈí¼þ°ü
£¨ÓÐÈË˵PHPÔ´Âë°üÀï×Ô ......
<?php
/*
*PHP¹ÜÀíMYSQLµÄÊý¾Ý¿âÀà
ʹÓ÷½·¨£º$dbConn = new DbConn([$Êý¾Ý¿âÃû(¿ÉÑ¡)]);
ÔÊÐí·µ»ØµÄ·½·¨£º
Execute($sql) //Ö´ÐÐSQLÓï¾ä£¬Ã»Óзµ»ØÖµ;
getRs($sql) //·µ»Ø²éѯÓï¾äµÄ¼Ç¼£¬Ò»Ìõ;
getRsArray($sql) //·µ» ......
<?php
$host="192.168.1.214";
$post=21;
$username="zwc3g";
$password="zwc3ggg";
$ftp=ftp_connect($host,$post);
ftp_login($ftp,$username,$password);
displayTheFolder($ftp,"/zhulu2");
//´òÓ¡FTPÉϵĸÃĿ¼ÏµÄËùÓÐÎļþ¡£
fu ......