PHP - CURL 實例PHP - CURL 實例 & setopt parameter ex:<?php// create a new CURL resource$ch = curl_init();// set URL and other appropriate optionscurl_setopt($ch, CURLOPT_URL, "http://www.example.com/");curl_setopt($ch, CURLOPT_HEADER, false);// grab URL and pass it to the browsercurl_exec($ch);// close CURL resource, and free up system resourcescurl_close($ch);?>print -> You have reached this web page by typing "example.com", "example.net", or "example.org" into your web browser.These domain names are reserved for use in documentation and are not available for registration. See RFC 2606, Section 3.setopt parameter :->http://www.zend.com/manual /function.curl-setopt.phpcurl_setopt(PHP 4 >= 4.0.2, PHP 5)curl_setopt -- Set an option for a CURL transfer.
- Apr 15 Sun 2012 04:02
PHP - CURL 實例
close
全站熱搜
留言列表
禁止留言