Skip to content

Instantly share code, notes, and snippets.

View aznoisib's full-sized avatar

aznoisib aznoisib

View GitHub Profile
@aznoisib
aznoisib / pagination_blogger.js
Created August 19, 2019 10:40
pagination blogger javascript bootstrap style
var nopage;
var jenis;
var nomerhal;
var lblname1;
halamanblogger();
function loophalaman(banyakdata) {
var html = '';
nomerkiri = parseInt(numshowpage / 2);
if (nomerkiri == numshowpage - nomerkiri) {
@aznoisib
aznoisib / gist:00d72915b513c2e6b9a1f35df8427008
Created August 2, 2019 09:07 — forked from voskobovich/gist:15ad5fc71e957bbe87d45cd88295f5b8
Video streamer from remote server by HTTP on PHP (Yii2)
/**
* @param $url
*/
public function actionStreamVideoFromCdn($url)
{
$headersCollection = Yii::$app->request->getHeaders();
$responseHeaders = [];
$chInfo = curl_init();
curl_setopt($chInfo, CURLOPT_URL, $url);
@aznoisib
aznoisib / attachment.php
Created August 2, 2019 09:07 — forked from ssut/attachment.php
UTF-8 file download function, support remote file passing(proxy) with http range header
<?php
/**
* PHP File download function.
* Version 1.4
*
* Copyright (c) 2014 성기진 Kijin Sung
* Modified by ssut
*
* License: MIT License (a.k.a. X11 License)
@aznoisib
aznoisib / ftp_download.php
Created August 2, 2019 04:48 — forked from staatzstreich/ftp_download.php
Download a directory from an FTP Server
<?php
// ftp_sync - copy directory and file structure
// based on http://www.php.net/manual/es/function.ftp-get.php#90910
// main function witch is called recursivly
function ftp_sync($dir, $conn_id) {
if ($dir !== '.') {
if (ftp_chdir($conn_id, $dir) === FALSE) {
echo 'Change dir failed: ' . $dir . PHP_EOL;
return;
@aznoisib
aznoisib / download_file.php
Created August 2, 2019 02:57 — forked from saleemkce/download_file.php
PHP File Download Script - Download large file in chunks.
<?php
/*ini settings*/
set_time_limit(0);
ini_set('memory_limit', '512M');
//DOWNLOAD SCRIPT
$filePath = "G:/Software/versions/..PATH TO DOWNLOAD FILE...zip"; // set your download file path here.
download($filePath); // calls download function
function download($filePath)
{
@aznoisib
aznoisib / unzip.php
Created August 1, 2019 23:50 — forked from kirtan403/unzip.php
PHP script to remotely zip/unzip archives of your FTP
<?php
function show($str){
echo $str . "<br/>\n";
flush();
ob_flush();
}
$archiveDir = "temp";
@aznoisib
aznoisib / codeiginter-server-config.md
Created April 23, 2019 18:06 — forked from yidas/codeiginter-server-config.md
Codeigniter 3 server configuration for Nginx & Apache

Codeigniter 3 server configuration for Nginx & Apache

Web Server Site Configuration

Recommended Apache Configuration

Use the following configuration in Apache's httpd.conf file or within a virtual host configuration. Note that you should set DocumentRoot and ServerName fit to your environment:

@aznoisib
aznoisib / easygistgithub.php
Created May 9, 2018 19:58
Easy GitHub Gist Plugin allows you to embed GitHub Gists from https://gist.github.com/.
<?php
/*
Plugin Name: Easy GitHub Gist
Plugin URI: https://github.com/sivan/easy-github-gist
Description: Easy GitHub Gist Plugin allows you to embed GitHub Gists from https://gist.github.com/.
Usage: Just put the GitHub Gist url in the content.
Version: 0.2
Author: Sivan
Author URI: http://lightcss.com/
rrghh
ggrgrv