при отправке запроса будем подставлять User-Agent и разрешен редирект
This commit is contained in:
parent
f304814043
commit
f7bbcf41a6
10
app/app.php
10
app/app.php
@ -19,7 +19,7 @@ $sites = ContingentManager::getInstance()->getSites($dbNiimko);
|
|||||||
$specializations = ContingentManager::getInstance()->getSpecializations($dbNiimko);
|
$specializations = ContingentManager::getInstance()->getSpecializations($dbNiimko);
|
||||||
$sql = 'SELECT DISTINCT org_id FROM sveden_education_contingent';
|
$sql = 'SELECT DISTINCT org_id FROM sveden_education_contingent';
|
||||||
$org = $dbOpendata->selectQuery($sql);
|
$org = $dbOpendata->selectQuery($sql);
|
||||||
// print_r($sites);
|
print_r($sites);
|
||||||
// print_r($specializations);
|
// print_r($specializations);
|
||||||
// print_r($org);
|
// print_r($org);
|
||||||
$orgs = [];
|
$orgs = [];
|
||||||
@ -71,9 +71,15 @@ for ($i = $start; $i < count($sites); $i++) {
|
|||||||
'max' => 10,
|
'max' => 10,
|
||||||
'strict' => true,
|
'strict' => true,
|
||||||
'referer' => true,
|
'referer' => true,
|
||||||
|
'allow_directs' => true,
|
||||||
'track_redirects' => true,
|
'track_redirects' => true,
|
||||||
'headers' => [
|
'headers' => [
|
||||||
'content-type' => 'text/html;',
|
'User-Agent' => '
|
||||||
|
Mozilla/5.0 (X11; Linux x86_64)
|
||||||
|
AppleWebKit/537.36 (KHTML, like Gecko)
|
||||||
|
Chrome/124.0.0.0 YaBrowser/24.6.0.0 Safari/537.36
|
||||||
|
',
|
||||||
|
'Content-Type' => 'text/html;',
|
||||||
'charset' => 'utf-8'
|
'charset' => 'utf-8'
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
@ -21,7 +21,7 @@ final class ContingentManager
|
|||||||
{
|
{
|
||||||
// select kod as org_id, site from niimko.s_vuzes
|
// select kod as org_id, site from niimko.s_vuzes
|
||||||
// where ootype = 'vuz' and deleted = 'n' and fake = 'n'
|
// where ootype = 'vuz' and deleted = 'n' and fake = 'n'
|
||||||
$params = ['vuz', 'n', 'n'];
|
$params = ['vuz', 'n', 'n', 'RU'];
|
||||||
$query = $this->builder->select()
|
$query = $this->builder->select()
|
||||||
->setTable('s_vuzes')
|
->setTable('s_vuzes')
|
||||||
->setColumns(['org_id' => 'kod', 'site'])
|
->setColumns(['org_id' => 'kod', 'site'])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user