Skip to content

Commit

Permalink
Update, document, and enforce minimum PHP version.
Browse files Browse the repository at this point in the history
Closes joshdick#39.
  • Loading branch information
joshdick committed Jul 29, 2016
1 parent bf5dbd8 commit d1124f5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ miniProxy is a simple web proxy written in PHP that can allow you to bypass Inte

## Prerequisites

miniProxy should be able to run on any web server with PHP 5.3 or later. PHP's cURL extension must be installed.
miniProxy should be able to run on any web server with PHP 5.4.7 or later. PHP's cURL extension must be installed.

## Installation and Use

Expand Down
6 changes: 5 additions & 1 deletion miniProxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@

ob_start("ob_gzhandler");

if (!function_exists("curl_init")) die ("This proxy requires PHP's cURL extension. Please install/enable it on your server and try again.");
if (version_compare(PHP_VERSION, '5.4.7', '<')) {
die ("miniProxy requires PHP version 5.4.7 or later.");
}

if (!function_exists("curl_init")) die ("miniProxy requires PHP's cURL extension. Please install/enable it on your server and try again.");

//Helper function for use inside $whitelistPatterns.
//Returns a regex that matches all HTTP[S] URLs for a given hostname.
Expand Down

0 comments on commit d1124f5

Please sign in to comment.