1: <?php
2: $qqData = empty($_POST['qqline']) ? null : $_POST['qqline'];
3: if(!empty($qqData)){
4: $qqData = explode(",", $qqData);
5: array_walk($qqData, create_function('&$value, $key', '/*if(is_numeric($value)) */$value = "http://wpa.qq.com/pa?p=2:" . $value . ":3";'));
6:
7: require_once 'curl_multi_class.php';
8: $multi = new curl_multi();
9: $multi->setUrlList($qqData);
10: $multi->setOpt(array('CURLOPT_NOBODY' => 1, 'CURLOPT_HEADER' => 1));
11: $urlHeader = $multi->exec();
12: $line = array();
13: preg_match_all('/Content-Length: (\w{4})\b/', implode('', $urlHeader), $line);
14: //print_r($line);
15: if(isset($line[1]) && is_array($line[1]))
16: array_walk($line[1], create_function('&$value, $key', '$value = $value == 1638 && is_numeric($value);'));
17: print_r($line[1]);
18: }
19: ?>
20: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
21: <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
22: <head>
23: <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
24: <title></title>
25: </head>
26: <body>
27: <form action="" method="post">
28: <textarea name="qqline" id="" cols="30" rows="10">492726616,352037149,1145730003,121711090</textarea>
29: <input type="submit" value="提交" />
30: </form>
31:
32: </body>
33: <script type="text/javascript">
34: </script>
35: </html>