Is there a way to tell curl to not use cache
I am trying to find out file size of an url:$url1 = 'www.google.com';$curl1 = curl_init();curl_setopt($curl1, CURLOPT_URL, $url1); curl_setopt($curl1, CURLOPT_RETURNTRANSFER,...
View ArticleAnswer by Olaf Dietsche for Is there a way to tell curl to not use cache
You can use CURLOPT_FRESH_CONNECT for this. From curl_setoptCURLOPT_FRESH_CONNECT TRUE to force the use of a new connection instead of a cached one.curl_setopt($curl1, CURLOPT_FRESH_CONNECT,...
View ArticleAnswer by Subodh Ghulaxe for Is there a way to tell curl to not use cache
curl_setopt($curl1, CURLOPT_FRESH_CONNECT, 1); // don't use a cached version of the url CURLOPT_FRESH_CONNECT TRUE to force use of a new connection instead of a cached one.check example hereyou can set...
View ArticleAnswer by Dead Man for Is there a way to tell curl to not use cache
You can tell CURL to use fresh data by setting CURLOPT_FRESH_CONNECT to TRUEYou can read more about CURL function here :http://php.net/manual/en/function.curl-setopt.php
View ArticleAnswer by Tony Stark for Is there a way to tell curl to not use cache
Use CURLOPT_FRESH_CONNECT - TRUE to force the use of a new connection instead of a cached one.Example:<?php function check_url($url) { $c = curl_init(); curl_setopt($c, CURLOPT_URL, $url);...
View ArticleAnswer by Mike Walkowiak for Is there a way to tell curl to not use cache
The best way to avoid caching is applying the time or any other random element to the url, like this:$url .= '?ts=' . time();so for example instead of havinghttp://example.com/content.phpyou would...
View Article