ไปŠๅคฉ่ตท๏ผŒไฝ ๅฐฑๆ˜ฏๆ‡‚็Ž‹ ๐Ÿ‘

ไฝฟ็”จๆ–นๆณ•

็ฌฌไธ€็งๆ–นๅผ๏ผŒ็›ดๆŽฅๆŠŠไธ‹้ข่ฟ™ไธชๆ‹–ๅˆฐๆ”ถ่—ๅคนใ€‚็„ถๅŽๅœจไปปๆ„้กต้ข็‚นๅ‡ปไฝฟ็”จ

ๆ‡‚็Ž‹๐Ÿ‘

ๅ›พ็‰‡ๆฅ่‡ช๏ผšBV1hf4y127HD ๅฐ้ข

็ฌฌไบŒ็งๆ–นๅผ๏ผŒๅคๅˆถไปฅไธ‹javascriptไปฃ็ ๏ผŒๅœจๆต่งˆๅ™จๆ”ถ่—ๅคนๅณ้”ฎ->ๆทปๅŠ ็ฝ‘้กต->่ตทไธชๅๅญ—->ๅœจ็ฝ‘ๅ€้‡Œ็ฒ˜่ดดไปฃ็ 

1
javascript:if(typeof koe_knowking_clicked==='undefined'){var koe_knowking_clicked=true;if(typeof koe_knowking_get_select_text==='undefined'){function koe_knowking_get_select_text(){var resultText=window.getSelection().toString();if(selecter!=null&&koe_knowking_trim(selecter)!=""){resultText=selecter}else if(typeof document.selection!=='undefined'){var selecter=document.selection.createRange();var s=selecter.text;if(s!=null&&functionkoe_knowking_trim(s)!=""){resultText=s}}return resultText}function koe_knowking_trim(){return this.replace(/(^\s*)|(\s*$)/g,"")}}var koe_knowking_selected_text=koe_knowking_get_select_text();if(koe_knowking_selected_text!==''&&document.querySelector('#koe_knowking_audio')===null){if(typeof koe_knowking_msg==='undefined'){var koe_knowking_msg=document.createElement('p');koe_knowking_msg.setAttribute('style','position:fixed;top:0;left:0;padding:5px 10px;height:30px;line-height:30px;text-align:center;background-color:#000;color:#FFF;font-size:26px;z-index:99999999');document.body.appendChild(koe_knowking_msg)}else{koe_knowking_msg.style.display='block'}koe_knowking_msg.innerText='ๆ‡‚็Ž‹็ฅˆ็ฅทไธญ๐Ÿ™';if(typeof koe_knowking_style==='undefined'){var koe_knowking_style=document.createElement('style');koe_knowking_style.innerText='.koe_knowking_content,.koe_knowking_image_1,.koe_knowking_image_2{ position: fixed; left: 50%; transform: translate(-50%,-50%); -webkit-transform: translate(-50%,-50%); -moz-transform: translate(-50%,-50%); z-index: 99999999; display: none; } .koe_knowking_content { top: calc(50% + 200px); padding: 10px; font-size: 20px; color: #FFF; background-color: #000; } .koe_knowking_image_1,.koe_knowking_image_2{ top: 50%; height: 200px; }';document.head.appendChild(koe_knowking_style);var koe_knowking_content=document.createElement('div');koe_knowking_content.setAttribute('class','koe_knowking_content');document.body.appendChild(koe_knowking_content);var koe_knowking_image_1=document.createElement('img');var koe_knowking_image_2=document.createElement('img');koe_knowking_image_1.setAttribute('src','https://pic.downk.cc/item/5ed520b8c2a9a83be55a3848.png');koe_knowking_image_2.setAttribute('src','https://pic.downk.cc/item/5ed520b8c2a9a83be55a3843.png');koe_knowking_image_1.setAttribute('class','koe_knowking_image_1');koe_knowking_image_2.setAttribute('class','koe_knowking_image_2');document.body.appendChild(koe_knowking_image_1);document.body.appendChild(koe_knowking_image_2);var koe_knowking_timer=null;var koe_knowking_is_1=true}var koe_knowking_xhr=new XMLHttpRequest();koe_knowking_xhr.open('GET','https://bili.imba97.cn/baike.php?kw='+koe_knowking_selected_text,true);koe_knowking_xhr.onreadystatechange=function(){if(koe_knowking_xhr.readyState==4&&koe_knowking_xhr.status==200||koe_knowking_xhr.status==304){var json=JSON.parse(koe_knowking_xhr.responseText);var audio_url='http://tts.baidu.com/text2audio?lan=zh&ie=UTF-8&spd=5&text=ๆฒกๆœ‰ไบบๆฏ”ๆˆ‘ๆ›ดๆ‡‚๏ผŒๆ‡‚ไบ†ไธชๅฏ‚ๅฏž';if(json.status===1){audio_url='http://tts.baidu.com/text2audio?lan=zh&ie=UTF-8&spd=5&text=ๆฒกๆœ‰ไบบๆฏ”ๆˆ‘ๆ›ดๆ‡‚'+koe_knowking_selected_text+'๏ผŒ'+json.content;var audio=document.createElement('audio');audio.setAttribute('id','koe_knowking_audio');audio.setAttribute('autoplay','');var source=document.createElement('source');source.setAttribute('src',audio_url);audio.appendChild(source);audio.addEventListener('canplaythrough',function(){koe_knowking_msg.style.display='none';koe_knowking_content.innerText=json.content;koe_knowking_content.style.display='block';koe_knowking_image_1.style.display='block';koe_knowking_timer=setInterval(function(){if(koe_knowking_is_1){koe_knowking_image_1.style.display='none';koe_knowking_image_2.style.display='block'}else{koe_knowking_image_1.style.display='block';koe_knowking_image_2.style.display='none'}koe_knowking_is_1=!koe_knowking_is_1},300)});audio.addEventListener('ended',function(){koe_knowking_clicked=undefined;document.body.removeChild(audio);koe_knowking_content.style.display='none';koe_knowking_image_1.style.display='none';koe_knowking_image_2.style.display='none';koe_knowking_is_1=true;clearInterval(koe_knowking_timer);koe_knowking_timer=null});document.body.appendChild(audio)}else{koe_knowking_msg.innerText=json.content}}};koe_knowking_xhr.send()}else{koe_knowking_clicked=undefined}}void(0);

็ฌฌไบŒ็งๆ–นๅผๆœ‰ๅฏ่ƒฝไผš่ขซๆต่งˆๅ™จ่‡ชๅŠจๅˆ ๆމๆœ€ๅ‰้ข็š„javascript:๏ผŒ็ฒ˜่ดดไธŠๅŽๆฃ€ๆŸฅไธ€ไธ‹๏ผŒๆฒกๆœ‰็š„่ฏ้œ€่ฆ่‡ชๅทฑๆ‰‹ๅŠจๅŠ ไธ€ไธ‹

ๆœๅŠก็ซฏ

่ฟ™้‡Œ้œ€่ฆPHPๅŽป่Žทๅ–็™พๅบฆ็™พ็ง‘็š„้กต้ข๏ผŒ็›ฎๅ‰ๆ˜ฏๆ”พๅœจๆˆ‘ๆœๅŠกๅ™จไธŠ็š„๏ผŒๅฆ‚ๆžœๅˆฐๆ—ถๅ€™็”จ็š„ไบบๅคšไบ†ๆˆ‘ๅฏ่ƒฝไผšๅœๆމใ€‚

ไปฅไธ‹ๆบ็ ๏ผŒๅฏ่‡ช่กŒๅคๅˆถๆ”พๅœจ่‡ชๅทฑ็š„ๆœๅŠกๅ™จไธŠ๏ผŒๅ†ๆŠŠไธŠ้ขjavascriptไธญ็š„https://bili.imba97.cn/baike.phpๆ”นๆˆไฝ ็š„ใ€‚

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
<?php

header('content-type:application/json;charset=utf-8');
header('Access-Control-Allow-Origin: *');

function curlRequest($ipUrl) {

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $ipUrl);
curl_setopt($curl, CURLOPT_HEADER, 0);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($curl, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.2) AppleWebKit/525.13 (KHTML, like Gecko) Chrome/0.2.149.27 Safari/525.13');
$resultData = curl_exec($curl);
curl_close($curl);

return $resultData;

}

$kw = rawurlencode($_GET['kw']);

$data = curlRequest('https://baike.baidu.com/item/' . $kw);

$resultJsonArray = array(
'status' => 0,
'content' => 'ๆ— ็™พ็ง‘ๆˆ–ๅ…ถไป–้”™่ฏฏ'
);

preg_match_all('/็™พๅบฆ็™พ็ง‘้”™่ฏฏ้กต/', $data, $pregError);

if($pregError[0][0] !== NULL) {
$resultJsonArray['status'] = 1;
$resultJsonArray['content'] = '่ฟ™ไธชๆˆ‘ๆ˜ฏๆ‡‚็š„๏ผŒไฝ†ๆˆ‘ๆฒกๆœ‰ๆŸฅๅˆฐ๏ผŒ่ฟ™ๅพˆๅฏ่ƒฝๆ˜ฏCๅ›ฝๆž็š„้ฌผใ€‚';
die(json_encode($resultJsonArray));
}

preg_match_all('/<meta name="description" content="(.*)"/', $data, $pregData);

if(isset($pregData) && $pregData[1][0] !== NULL) {
$resultJsonArray['status'] = 1;
$resultJsonArray['content'] = $pregData[1][0];
}

die(json_encode($resultJsonArray));