Thread: The new epoch
View Single Post
Old 06-14-2015, 01:03 PM  
freecartoonporn
Confirmed User
 
freecartoonporn's Avatar
 
Industry Role:
Join Date: Jan 2012
Location: NC
Posts: 7,683
Quote:
Originally Posted by pornmasta View Post
i tried that with an incompatible browser but it is not enough.
PHP Code:
function file_get_contents_curl($url){
    
$ch curl_init ($url);
    
curl_setopt($chCURLOPT_SSL_VERIFYPEERfalse);
    
curl_setopt($chCURLOPT_USERAGENT'Mozilla/5.0 (Windows NT 5.1; rv:25.0) Gecko/20100101 Firefox/25.0');
    
curl_setopt($chCURLOPT_HEADER1);
    
curl_setopt($chCURLOPT_RETURNTRANSFER1);
    
curl_setopt($chCURLOPT_TIMEOUT20);   // some large value to allow curl to run for a long time
    
curl_setopt($chCURLOPT_FOLLOWLOCATIONtrue);
    
curl_setopt($chCURLOPT_REFERER$url);
    
$data curl_exec($ch);
    
curl_close ($ch);
return 
$data;
}


echo 
file_get_contents_curl('http://www.epochstats.com/webmasters/index.php'); 
Quote:
HTTP/1.1 302 Found
Date: Sun, 14 Jun 2015 19:57:24 GMT
Server: Apache
Strict-Transport-Security: max-age=63072000; includeSubdomains; preload
X-Content-Type-Options: nosniff
Location: https://www.epochstats.com/webmasters/index.php
Content-Length: 231
Content-Type: text/html; charset=iso-8859-1

HTTP/1.1 200 OK
Date: Sun, 14 Jun 2015 19:57:25 GMT
Server: Apache
Set-Cookie: PHPSESSID=33c7abf903f5be9e51c32fa9b51c0a8b; path=/; domain=epochstats.com; secure
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Strict-Transport-Security: max-age=63072000; includeSubdomains; preload
X-Content-Type-Options: nosniff
Vary: Accept-Encoding
P3P: CP="ADMa OUR IND DSP IDC COR", policyref="/w3c/p3p.xml"
Transfer-Encoding: chunked
Content-Type: text/html
you see only user agent and referer are sent and i can load the page, if i skip the referer then still page is loading fine.,

the first response saying correct url is

https://www.epochstats.com/webmasters/index.php

tried commenting the user agent too and still loading page.,

so only these are required ., new function .,

PHP Code:
function file_get_contents_curl($url){
    
$ch curl_init ($url);
    
curl_setopt($chCURLOPT_SSL_VERIFYPEERfalse);
    
curl_setopt($chCURLOPT_HEADER1);
    
curl_setopt($chCURLOPT_RETURNTRANSFER1);
    
$data curl_exec($ch);
    
curl_close ($ch);
return 
$data;

try url with https.
freecartoonporn is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote