Skip to content

Instantly share code, notes, and snippets.

@Silver22
Silver22 / install.php
Created October 17, 2021 21:35 — forked from tschoffelen/install.php
A simple PHP script that automatically downloads and unzips the latest version of Wordpress in the current directory (./), so that I don't have to download it and upload it to my server through FTP manually.
<?php
echo '<pre>';
echo '<span style="color:blue">DOWNLOADING...</span>'.PHP_EOL;
// Download file
file_put_contents('wp.zip', file_get_contents('https://wordpress.org/latest.zip'));
$zip = new ZipArchive();
$res = $zip->open('wp.zip');
if ($res === TRUE) {
2019-02-05 19:05:44.388075 [DEBUG] [*:443] New connection from 178.133.124.170:44273.
2019-02-05 19:05:44.388163 [DEBUG] NtwkIOLink::setLink called pInfo is m_pClientInfo 0x5617e87cbf80, m_pCrypto 0x5617e88e0aa8, m_pServerAddrInfo 0x5617e88dcf40, m_remotePort 44273
2019-02-05 19:05:44.388189 [DEBUG] [178.133.124.170:44273] concurrent conn: 1
2019-02-05 19:05:44.388198 [DEBUG] [178.133.124.170:44273] NtwkIOLink::handleEvents() events=1!
2019-02-05 19:05:44.388210 [DEBUG] [178.133.124.170:44273] onReadSSL(), none, wantRead: 0, wantWrite: 0, allowWrite: 1, allowRead: 1, m_ssl.wantRead: 1, m_ssl.wantWrite: 0, m_ssl.lastRead: 0, m_ssl.lastWrite: 0
2019-02-05 19:05:44.388222 [DEBUG] [178.133.124.170:44273] [SSL] SSLAgain()!
2019-02-05 19:05:44.392618 [DEBUG] [178.133.124.170:44273] setSSLAgain(), CR, wantRead: 0, wantWrite: 0, allowWrite: 1, allowRead: 1, m_ssl.wantRead: 1, m_ssl.wantWrite: 0, m_ssl.lastRead: 0, m_ssl.lastWrite: 0
2019-02-05 19:05:44.392642 [DEBUG] [178.133.124.170:44273] setSSLAgain(), SW, wantRe
2019-02-05 19:03:59.277013 [DEBUG] [*:443] New connection from 46.133.110.140:25585.
2019-02-05 19:03:59.277105 [DEBUG] NtwkIOLink::setLink called pInfo is m_pClientInfo 0x5617e8966d30, m_pCrypto 0x5617e8ab74a8, m_pServerAddrInfo 0x5617e88d47c0, m_remotePort 25585
2019-02-05 19:03:59.277132 [DEBUG] [46.133.110.140:25585] concurrent conn: 1
2019-02-05 19:03:59.277141 [DEBUG] [46.133.110.140:25585] NtwkIOLink::handleEvents() events=1!
2019-02-05 19:03:59.277153 [DEBUG] [46.133.110.140:25585] onReadSSL(), none, wantRead: 0, wantWrite: 0, allowWrite: 1, allowRead: 1, m_ssl.wantRead: 1, m_ssl.wantWrite: 0, m_ssl.lastRead: 0, m_ssl.lastWrite: 0
2019-02-05 19:03:59.277161 [DEBUG] [46.133.110.140:25585] [SSL] SSLAgain()!
2019-02-05 19:03:59.279978 [DEBUG] [46.133.110.140:25585] setSSLAgain(), CR, wantRead: 0, wantWrite: 0, allowWrite: 1, allowRead: 1, m_ssl.wantRead: 1, m_ssl.wantWrite: 0, m_ssl.lastRead: 0, m_ssl.lastWrite: 0
2019-02-05 19:03:59.280007 [DEBUG] [46.133.110.140:25585] setSSLAgain(), SW, wantRead: 0,