Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
easy to use cURL wrapper with added file cache
branch: master

Merge pull request #2 from omercnet/patch-1

Revised $changed assignment to remove E_NOTICE error. Thanks to @omercnet for the fix!
latest commit b43b48cb43
Dirk Ginader authored
Failed to load latest commit information.
example.php added debug option
readme.markdown test
simpleCachedCurl.inc.php Revised $changed assignment to remove E_NOTICE error

readme.markdown

PHP simple cached cURL

Dirk Ginader

very simple wrapper for cURL that creates a local file cache

usage: created a folder named "cache" in the same folder as this file and chmod it 777 call this function with 2+1 parameters:

$curlReturn = simpleCachedCurl($url,$expires,$debug);

$url (string) the URL of the data that you would like to load
$expires (integer) the amound of seconds the cache should stay valid
$debug (boolean, optional) write debug information for troubleshooting

returns either the raw cURL data or false if request fails and no cache is available

Requirements

  • PHP cURL (php5-curl)
Something went wrong with that request. Please try again.