Вход Регистрация
Файл: 3020.ru/_core/_class/curl.php
Строк: 67
<?php
    
//3020.ru - скрипты скачать можно тут
    # класс curl
    # author penny wise
    # telegram @the_penny_wise

    
class curl {

        function 
get($url,$tpage,$post null){   # подключение по curl к сайту

        
$curl curl_init();  
        
$ua 'Nokia 6230';    
        
$headers = array(
        
'Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
        
'Accept-Language:ru,en-US;q=0.8,en;q=0.6,uk;q=0.4',
        
'Referer:' $url,$ua);
        
curl_setopt($curlCURLOPT_URL$url);  
        
curl_setopt($curlCURLOPT_USERAGENT$ua);  
        
curl_setopt($curlCURLOPT_REFERER$url);  
        
curl_setopt($curlCURLOPT_RETURNTRANSFER,1);  
        
curl_setopt($curlCURLOPT_TIMEOUT60); 
        
curl_setopt($curlCURLOPT_COOKIEJARcache.'_cookies/'.$tpage.'.dat');
        
curl_setopt($curlCURLOPT_COOKIEFILEcache.'_cookies/'.$tpage.'.dat');
        
curl_setopt($curlCURLOPT_HTTPHEADER$headers);
        
curl_setopt($curlCURLOPT_HEADER1);
        if(
$post != null) :
        
curl_setopt($curlCURLOPT_POST1);
        
curl_setopt($curlCURLOPT_POSTFIELDS$post);
        endif;
        
curl_setopt($curlCURLOPT_FOLLOWLOCATIONtrue);
        
$cnt curl_exec($curl);  
        
curl_close($curl); 
        return 
$cnt;  
    
        }  
    

        function 
img($url){ # подключаемся к изображению

        
header('Content-Type: image/jpeg');
            
        print 
file_get_contents(base64_decode($url));
    
        }    

        function 
files($url){

        
$file base64_decode($url);  
        
$url base64_decode($url);  

        
$finfo = new SplFileInfo($file);  
        
$fn $finfo->getFilename();  
        if (
$h get_headers($url1)):  
        if (!empty(
$h['Location'])):  
        
$url $h['Location'];  
        
$h get_headers($url1);  
        endif;  
        if (
ob_get_level())  
        
ob_end_clean();  

        
header('Content-Description: File Transfer'); 
        
header('Content-Type: application/octet-stream'); 

        
header('Content-Disposition: attachment; filename='.$_SERVER['HTTP_HOST'].'_'.str_replace('spcs.me','',preg_replace('|?real=(.*?)xyz-1|is'''$fn)));  

        
header('Content-Transfer-Encoding: binary'); 
        
header('Expires: 0'); 
        
header('Cache-Control: must-revalidate'); 
        
header('Pragma: public'); 
        
header('Content-Length: '.$h['Content-Length']); 
        
readfile($file) . exit;  
        else:  
        
header('location: ' $file) . exit;  
        endif;
        }

    } 

?>
Онлайн: 1
Реклама