Guest User

Untitled

a guest
Jan 28th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.48 KB | None | 0 0
  1. <?php
  2. $key = '/e8SE81Dtn4l/NwlIMLvXHFutoXjilTk';
  3. $fp = stream_socket_client('tcp://localhost:30033', $errno, $errstr, 30, STREAM_CLIENT_CONNECT);
  4. if (!$fp) {
  5.     die('connection failed');
  6. }
  7.  
  8. fwrite($fp, $key);
  9.  
  10. $size = intval(5245060);
  11. $pack = 4096;
  12.  
  13. $datas = '';
  14. for($seek = 0;$seek < $size;)
  15. {
  16.     $rest = $size-$seek;
  17.     $pack = $rest < $pack ? $rest : $pack;
  18.     $data = fread($fp, $rest < $pack ? $rest : $pack);
  19.     $seek = $seek+$pack;
  20.     $datas .= $data;
  21. }
  22.  
  23. echo strlen($datas);
Add Comment
Please, Sign In to add comment