关键词:
/**
* cURL file copy to another server
* This file saved my life when i had to let a file upload synchrom to a different server, no ftp messing around!
*/
$rCurl = curl_init();
/**
* The file to copy
*/
curl_setopt($rCurl, CURLOPT_URL, 'http://www.google.nl/intl/nl_nl/images/logo.gif');
/**
* cURL options dunno what for
*/
curl_setopt($rCurl, CURLOPT_HEADER, false);
/**
* cURL options dunno what for
*/
curl_setopt($rCurl, CURLOPT_BINARYTRANSFER, true);
/**
* cURL options dunno what for
*/
curl_setopt($rCurl, CURLOPT_RETURNTRANSFER, true);
/**
* The php file limit
*/
set_time_limit(300);
/**
* set cURL timeout
*/
curl_setopt($rCurl, CURLOPT_TIMEOUT, 300);
/**
* The file that will be written
*/
$rOutPut = fopen('googlelogo.gif', 'wb');
/**
* Setup the transfer ?
*/
curl_setopt($rCurl, CURLOPT_FILE, $outfile);
/**
* Execute the transfer
*/
curl_exec($rCurl);
/**
* Close the file
*/
fclose($rOutPut);
/**
* Close cURL
*/
curl_close($rCurl);
phpphp的基本curl包装函数(代码片段)
查看详情
phpphp-curl收到xml(代码片段)
查看详情
phpphp利用curl发送帖子get请求(代码片段)
查看详情
phpphp函数:curl抓取网站内容的,支持301302跳转(代码片段)
查看详情
phpphp中的短代码(代码片段)
查看详情
phpphp中的stdclass(代码片段)
查看详情
phpphp中的日期(代码片段)
查看详情
phpphp中的单例(代码片段)
查看详情
phpphp中的browserdetectionscript(代码片段)
查看详情
phpphp中的cors(代码片段)
查看详情
phpphp中的gzipcss文件(代码片段)
查看详情
phpphp中的gzip文件(代码片段)
查看详情
phpphp中的简单日历(代码片段)
查看详情
phpphp中的json标题(代码片段)
查看详情
phpphp中的httpbot类(代码片段)
查看详情
phpphp5中的sqldataobj(代码片段)
查看详情
phpphp中的快速目录列表(代码片段)
查看详情
phpphp中的递归chmod(代码片段)
查看详情