Mavzu: Saytga grabber va modullar o'rnatish
So'rov natijasi
Mavzu foydalimi?
ha (4)
yoq (3)
64. root (149) [off] | TXT | 31| 6 May 2019, 19:49
Dasturist, unday bolsa ozroq harakat qiling qandaydur fileni tashlab shuni qilib ber demasdan shunday qildim uxshamadi yordam ber den bu togri boladi zip file qilib tashlang toliq yordam beraman albatta faqat savolni togri berish kerak
65. Dasturist (25) [off] | TXT | 38| 6 May 2019, 21:39
root (6 May 2019, 19:49):
Dasturist, unday bolsa ozroq harakat qiling qandaydur fileni tashlab shuni qilib ber demasdan shunday qildim uxshamadi yordam ber den bu togri• • •
root,

<?php







//Отключаем лимит ожидания и объявляем переменные







    
set_time_limit(0);







    
$content=NULL;$num_pages=NULL;







//Подключение к базе







//Подключаемся к базе данных







    
define ("HOST""localhost");







    
define ("dаtаBASE""ваша база данных");







    
define ("MYSQL_USER""ваш юзер");







    
define ("MYSQL_PASS""ваш пароль");







    
mysql_connect(HOSTMYSQL_USERMYSQL_PASS);mysql_query("set names utf8");mysql_select_db(dаtаBASE);







//Узнаём кол-во страниц







    
$content=file_get_contents('http://bash.im/');







    
preg_match('|max="(.*?)"|is',$content,$num_pages);







//Парсим каждую страницу







    
for ($i=1$i <= $num_pages[1]; $i++){$i2=false;







        
//Грузим страницы, вырезаем цитаты







        
$content=file_get_contents('http://bash.im/index/'.$i);







        
$quotes=explode('<span class="date">',$content);







        foreach(
$quotes as $quote){







            if(
$i2==false){$i2=true;continue;}







            
//Номер цитаты







            
preg_match('|class="id"><a href='/search.php?q=(.*?)</a>|is',$quote,$quote_id);&d=2'>#(.*?)</a>|is',$quote,$quote_id);</a>







            //Текст цитаты







            
preg_match('|<div class="text">(.*?)</div>|is',$quote,$quote_text);







            
//Конвертация текста в UTF-8 и экранирование символов







            
$quote_text=strip_tags(addslashes(htmlspecialchars(trim(iconv("windows-1251","UTF-8",$quote_text[1])))));







            
//Вписываем в базу







            
if($quote_text!=NULL){mysql_query("INSERT INTO `bash`(`id`,`quote_id`,`quote_text`) VALUES (NULL,'{$quote_id[1]}','{$quote_text}')");}







        }







        
//От перенагрузки







        
sleep(2);







    }







?>





kodni ham yozib qo'yaveray hullas johncms.com/library dagi maqolalarni meni saytimni bazasiga yozib beradigan qilish kerak shunga azgina aql yetmey turipti
59 sekunddan so'ng qo'shdi...
fayl yuklab bo'lmadi
66. Madridman (10) [off] | TXT | 29| 14 Jun 2019, 09:01

http://fanatuz.ru/std
shu grabberga saytimni head.php bilan end.php sini qanday qoyaman yordam beringlar :)
12760dan so'ng qo'shdi...

http://fanatuz.ru/std
shu grabberga saytimni head.php bilan end.php sini qanday qoyaman yordam beringlar :)
67. SHAHZODBEKK (90) [off] | TXT | 26| 15 Jun 2019, 21:32
Graberga dizayn qanday ornatiladi yoki core.php bn head.php ga qanday ulanadi?
68. MasTeR_BiN (46) [off] | TXT | 16| 24 Jul 2019, 01:05
Men Brigand tarqatgan grabberdi o'rnatgandim lekin dizayn o'zgarib qolyabdi nimadan bo'lishi mimkin?
69. Mahmudjon_BEST (533) [off] | TXT | 16| 24 Jul 2019, 09:10
Graber qanday o'rnatiladi saytga? Kim menga batafsil chuntiradi :)
70. Boss (478) [off] | TXT | 15| 24 Jul 2019, 12:25
MasTeR_BiN (24 Jul 2019, 01:05):
Men Brigand tarqatgan grabberdi o'rnatgandim lekin dizayn o'zgarib qolyabdi nimadan bo'lishi mimkin?
MasTeR_BiN, Manzilini özgartirish kerakda
Ma'lumotlar
Mavzu id raqami: 1198
Mavzuga oid xabarlar soni: 70 ta
So'ngi faollik vaqti: 24 Jul 2019, 12:25
Mavzuni ko'rishgan: 117 kishi
» txt shaklida yuklab olish
» Mavzudagi yangi xabarlardan xabardor bo'lishni rad etish
www.uzmasters.ru Onlayn 169 (0/169)
www.uzmasters.ru Forumga a'zo bo'lish
www.uzmasters.ru Forumdan qidirish
www.uzmasters.ru Bosh sahifa
Яндекс.Метрика UzMasterS.Ru