curl downloads files to local server
Jump to [Full screen preview]
<?php $source = "http://apkegg.mumayi.com/cooperation/2016/06/06/0/18/latiao_V1.1_mumayi_3dfc4.apk"; $ch = curl_init();//初始化一个cURL会话 curl_setopt($ch,CURLOPT_URL,$source);//抓取url curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);//是否显示头信息 curl_setopt($ch,CURLOPT_SSLVERSION,3);//传递一个包含SSL版本的长参数 $data = curl_exec($ch);// 执行一个cURL会话 $error = curl_error($ch);//返回一条最近一次cURL操作明确的文本的错误信息。 curl_close($ch);//关闭一个cURL会话并且释放所有资源 $destination = './latiao.apk'; $file = fopen($destination,"w+"); fputs($file,$data);//写入文件 fclose($file);
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undress AI Tool
Undress images for free

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article
How to report an impersonation account on Instagram
3 weeks ago
By 下次还敢
Wuchang: Fallen Feathers - Dragon Emperor Zhu Youjian Boss Fight Guide
4 weeks ago
By DDD
How to Change ChatGPT Personality in Settings (Cynic, Robot, Listener, Nerd)
3 weeks ago
By DDD
How to Fight Eris in Neon Abyss
3 weeks ago
By Jack chen
Pokémon TCG Scarlet & Violet: Black Bolt Elite Trainer Box Review
4 weeks ago
By Jack chen

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)