Preg Match Yardım

kullanici918492 (1) 9 yıl önce sordu

merhabalar arkadaşlar  elimde böyle bir kod var

ben sonuçta çıkan html ve textbox yerine sadece linki istiyorum ama bir türlü başaramıyorum

<?php
 
if(isset($_GET["url"]))
	$downlink = $_GET["url"];
 login("http://198.50.191.225/gtb/login.php","secure=0jmpq0vb1","submit=Submit");
 post_data("http://198.50.191.225/gtb/index.php","urllist=$downlink");
 
function login($url,$data){
    $fp = fopen("cookie.txt", "w");
    fclose($fp);
    $login = curl_init();
    curl_setopt($login, CURLOPT_COOKIEJAR, "cookie.txt");
    curl_setopt($login, CURLOPT_COOKIEFILE, "cookie.txt");
    curl_setopt($login, CURLOPT_TIMEOUT, 40000);
    curl_setopt($login, CURLOPT_RETURNTRANSFER, TRUE);
    curl_setopt($login, CURLOPT_URL, $url);
    curl_setopt($login, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
    curl_setopt($login, CURLOPT_FOLLOWLOCATION, TRUE);
    curl_setopt($login, CURLOPT_POST, TRUE);
    curl_setopt($login, CURLOPT_POSTFIELDS, $data);
    ob_start();
    return curl_exec ($login);
    ob_end_clean();
    curl_close ($login);
    unset($login);    
}                  
 
 
function post_data($site,$data){
    $datapost = curl_init();
    curl_setopt($datapost, CURLOPT_URL, $site);
    curl_setopt($datapost, CURLOPT_POST, TRUE);
    curl_setopt($datapost, CURLOPT_POSTFIELDS, $data);
        curl_setopt($datapost, CURLOPT_COOKIEFILE, "cookie.txt");
    ob_start();
    return curl_exec ($datapost);
    ob_end_clean();
    curl_close ($datapost);
    unset($datapost);   

}




 
?>

 

Toplam 0 cevap