php session_start error_reporting Disable warnings from session header

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
session_start();
error_reporting(0); //Disable warnings from session
header('Content-Type: text/html; charset=UTF-8');
require_once 'lib/Threads.php';
set_time_limit(200000);
$url = "http://filmcatch.ru/sitemap.xml"; //Адресс с которого будут парсится картинки
$text = file_get_contents($url);
if ($c = preg_match_all ("/<loc>(.*?)<\\/loc>/is", $text , $title)){
$x = 1;
$m = 0;
$num = 50;
$con = 0;
while($con < 20){ // создадим 20 потоков, пока что...
$Thread->Create(function(){
$i = $con * $num;
while($x!="") {
$x = $title[1][$i];
$t = $tim[1][0];
if ($x!="") {
$urql = $x; //Адресс с которого будут парсится картинки
$txt = file_get_contents($urql);
preg_match_all ("/<iframe src=[\'\"](.*?)[\'\"]/", $txt , $tim);
foreach($tim[1] as $value){
$teststrw = $value;
$turlw=file_get_contents($teststrw);
$searchw = 'color:#777;';
$posw = strpos($turlw, $searchw);
if ($posw === false) {
echo "";
} else {
echo '<div><a id="url" href="' . $x . '">' . $x . '</a><a id="video" href="' . $value . '">' . $value . '</a></div><br />';
}
}
}
$i++;
}
});
$con++;
}
}
$Thread->Create('string');
print_r($Thread->Run(false)); //Array with threads responses. This threads don't print anything, because here is false.