Untitled
raw download clone
TEXT
views 72
,
size 749 b
<?php

    $email = array(
            'host' 		=> '{imap.yandex.com:993/imap/ssl/novalidate-cert}INBOX',
            'username' 	=> 'user yandex lu',
            'password' 	=> 'pass yandex lu'
        );

     $read = imap_open($email['host'],$email['username'],$email['password']);
     $array = imap_search($read,'SUBJECT "BIGtoken"');
     
     foreach($array as $a){
        $header = imap_header($read, $a);
        $html = imap_qprint(imap_fetchbody($read, $a, 1));
        
        $dom = new DOMDocument;
        @$dom->loadHTML($html);
        $links = $dom->getElementsByTagName('a');
        $link = $links[1]->getAttribute('href')."\n";  
        file_put_contents('link.txt', $link, FILE_APPEND | LOCK_EX);
     }
close fullscreen
Login or Register to edit or fork this paste. It's free.