From 12e0a58258c66914eae26b2ed513de9c2233d738 Mon Sep 17 00:00:00 2001 From: mirivlad Date: Mon, 21 Aug 2023 16:18:47 +0300 Subject: [PATCH] Add auto-getting favicons for links --- 128.png | Bin README.md | 0 assets/css/style.css | 0 assets/img/fav.png | Bin assets/js/iconify.js | 0 assets/js/jquery.js | 0 assets/js/script.js | 0 get_fav.php | 16 ++++++++++++++ ico/hd.kinopoisk.ru.png | Bin 0 -> 292 bytes ico/mail.google.com.png | Bin 0 -> 726 bytes ico/mail.yandex.ru.png | Bin 0 -> 726 bytes ico/music.yandex.ru.png | Bin 0 -> 488 bytes ico/ok.ru.png | Bin 0 -> 436 bytes ico/vk.com.png | Bin 0 -> 275 bytes ico/www.printables.com.png | Bin 0 -> 229 bytes ico/www.thingiverse.com.png | Bin 0 -> 258 bytes ico/youtube.com.png | Bin 0 -> 228 bytes index.php | 5 +++-- quotes.php | 43 ++++++++++++++++++++++++++++++++++++ vars.php | 0 20 files changed, 62 insertions(+), 2 deletions(-) mode change 100644 => 100755 128.png mode change 100644 => 100755 README.md mode change 100644 => 100755 assets/css/style.css mode change 100644 => 100755 assets/img/fav.png mode change 100644 => 100755 assets/js/iconify.js mode change 100644 => 100755 assets/js/jquery.js mode change 100644 => 100755 assets/js/script.js create mode 100644 get_fav.php create mode 100644 ico/hd.kinopoisk.ru.png create mode 100644 ico/mail.google.com.png create mode 100644 ico/mail.yandex.ru.png create mode 100644 ico/music.yandex.ru.png create mode 100644 ico/ok.ru.png create mode 100644 ico/vk.com.png create mode 100644 ico/www.printables.com.png create mode 100644 ico/www.thingiverse.com.png create mode 100644 ico/youtube.com.png mode change 100644 => 100755 index.php create mode 100755 quotes.php mode change 100644 => 100755 vars.php diff --git a/128.png b/128.png old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/assets/css/style.css b/assets/css/style.css old mode 100644 new mode 100755 diff --git a/assets/img/fav.png b/assets/img/fav.png old mode 100644 new mode 100755 diff --git a/assets/js/iconify.js b/assets/js/iconify.js old mode 100644 new mode 100755 diff --git a/assets/js/jquery.js b/assets/js/jquery.js old mode 100644 new mode 100755 diff --git a/assets/js/script.js b/assets/js/script.js old mode 100644 new mode 100755 diff --git a/get_fav.php b/get_fav.php new file mode 100644 index 0000000..4b824ec --- /dev/null +++ b/get_fav.php @@ -0,0 +1,16 @@ +BaGo*1j8P0hA<_DZgU1%ZUzTQhEjcoeaUsHK$|K(T^vIsrsnp) z6lzuwXl9<~x;wz;LRIM7-}_VCk2BAC7Qb(%ubGE&XRwiXpwguFo`Y%gd7dnGzWXM` zCgH_hDQ&+Gi`HGdwS)Oa9Pgc2MFd-tO*So2%6+z>Y^AzY*7f5e m)@S1X1XpgK%K!ZLEB49TS^1{yx%mp{2nJ7AKbLh*2~7Zn&11s= literal 0 HcmV?d00001 diff --git a/ico/mail.google.com.png b/ico/mail.google.com.png new file mode 100644 index 0000000000000000000000000000000000000000..1e660b740906b95894663a8785846d0c410402bc GIT binary patch literal 726 zcmV;{0xA88P)@(4yGRbW8k2Tc*C=3xZqXT^aB%>1XK{VTBTWNyDi=BLalE`YtY1tPV)B6zWI2+ zH}e})yvV)=p=E~-^0+IbgOcDLG7R;zhlO3F!> z)2iIRJEo0~^@0fz+?alB*Y%peFVsF;F6+_Wpx_m|+XR*ftW9PJiUO>xY#!{&`5f=E zExr4o#BDZn_UYn`MhNic!GUwLmCEt-;3Z!m*eO7>!wSPg9dJ}JpwrJox9AbxY-WYU zCuwJ>#{(Oi`|}K3<_toNFxYCj8lAa4O2K%Bw@d4LsFHXE2Q)D>cW#Xa&=+ISKnV<^ z7V8SQy^+h}4{!E8W(jb)TO4$Dq@6&asIh-Li09p2T|bGTff8WBCMNm?bUH29uJ!@n zOs|Ayy9F-vcwt9AgvrSP;V`d-(U+`6Rdb&8@Z^kd@9?$KY6PRBnO(K7lu!lqRap$` zga8!`M2QS{!KW_;R)gQskdb|`4k!)w5CZJ;j;!#$c9BqAXZ?MdmSKxr0XqP`b_a|{ zf}j+tu(h2dZlIYEw7DIr7p%`e{b?KO_d`x8(~{PAA@Mp(=bly$o;`nifH8PL2^hoX zJ~EQvt$&lx>{+#MK*+LR)f{KD%>7Eh=$S%>#TV8xjU-q=M9~n`rB^aMh_7Z^T-=hB zk_iFT0J)9y4E1{8;iJ{)^74jvYU-kZJjfR-z<2_wgmjR}7IG~-xAcBniDL{Vr&%~X zOp&k{){T>U*k`p=b>ggGk%cx#(#|!_ttIx-&Oe8#0rOw>?^q!lUgi3;(*OVf07*qo IM6N<$f|IpWF#rGn literal 0 HcmV?d00001 diff --git a/ico/mail.yandex.ru.png b/ico/mail.yandex.ru.png new file mode 100644 index 0000000000000000000000000000000000000000..1e660b740906b95894663a8785846d0c410402bc GIT binary patch literal 726 zcmV;{0xA88P)@(4yGRbW8k2Tc*C=3xZqXT^aB%>1XK{VTBTWNyDi=BLalE`YtY1tPV)B6zWI2+ zH}e})yvV)=p=E~-^0+IbgOcDLG7R;zhlO3F!> z)2iIRJEo0~^@0fz+?alB*Y%peFVsF;F6+_Wpx_m|+XR*ftW9PJiUO>xY#!{&`5f=E zExr4o#BDZn_UYn`MhNic!GUwLmCEt-;3Z!m*eO7>!wSPg9dJ}JpwrJox9AbxY-WYU zCuwJ>#{(Oi`|}K3<_toNFxYCj8lAa4O2K%Bw@d4LsFHXE2Q)D>cW#Xa&=+ISKnV<^ z7V8SQy^+h}4{!E8W(jb)TO4$Dq@6&asIh-Li09p2T|bGTff8WBCMNm?bUH29uJ!@n zOs|Ayy9F-vcwt9AgvrSP;V`d-(U+`6Rdb&8@Z^kd@9?$KY6PRBnO(K7lu!lqRap$` zga8!`M2QS{!KW_;R)gQskdb|`4k!)w5CZJ;j;!#$c9BqAXZ?MdmSKxr0XqP`b_a|{ zf}j+tu(h2dZlIYEw7DIr7p%`e{b?KO_d`x8(~{PAA@Mp(=bly$o;`nifH8PL2^hoX zJ~EQvt$&lx>{+#MK*+LR)f{KD%>7Eh=$S%>#TV8xjU-q=M9~n`rB^aMh_7Z^T-=hB zk_iFT0J)9y4E1{8;iJ{)^74jvYU-kZJjfR-z<2_wgmjR}7IG~-xAcBniDL{Vr&%~X zOp&k{){T>U*k`p=b>ggGk%cx#(#|!_ttIx-&Oe8#0rOw>?^q!lUgi3;(*OVf07*qo IM6N<$f|IpWF#rGn literal 0 HcmV?d00001 diff --git a/ico/music.yandex.ru.png b/ico/music.yandex.ru.png new file mode 100644 index 0000000000000000000000000000000000000000..0f6911f9997d3e0bf11efe89999f2f34f9a0b18b GIT binary patch literal 488 zcmVP)k5nnxM*)-*m@EP}j=&qpIe~QpD>u*$BAvj}2`rx=Opr!wWSu|?-~cI| zHcM$-kV`#cXn+NF-t*7?D^A3gbSuX#kR!gtA1SI&?*^veA`09@#h=Y#d~m3^lJVBD z77PVxTU6>w47V1qUGM!@%ag?WqBeQKqu`=Z{{r(U;;0*d#IUlrIXq`=0ar3^lZ}V) z4FhF7A3?)bGHnojjEB9WB&|xUIn&dQ0It^=xn8I6_d{Q_g`ro%cz<_Som`=Az!Ctn z+8+OS8UfgnWc!aiG9#4$nEA1r(z{gGp2Ix+=MAx*Ulu=~fHweX_ws z85{pbHI>y;8DJ{aFJn7WL=JdPtm4c1ujnAbQ~LHC1cONwGxD6#e*yJQMh(F{M^=a; eiWw_A{$MZgQm~zlOsQ4?0000pl zvfpQBXWu(>?>+bHDKZF5+CUHJ0(wZh;b*G}UeaDgjzcP(G6sg(pcza#V5=#96d-h7 z1NF%4ybhOrIloO|pAvRC&{0$T5Fz!7J$UNC_ogU-uH~pkUzCj&tZaB+$a%DdW`4pYz$0E5QTlNuP@_+Z z|5|4KT@83mQTs4uXAyHNTe$QtL;-SPsp>L&XD-UkflMV2TT>G@z$`^yS@L%lqF%1R z^*HN1Qxm*+l}}hl6EWIia_qd(mYs+|NqB}>w6}99cpf0!8~#2+^3P( zes;fjw3z3ou+2_knU{YRR=eI7Dt4XLprPpKy0C{i=|u+jF&D+vpIKhMV2ny-_HOEn zcDj2&)$zW@fd9>LIVDNPH Kb6Mw<&;$TdLw8gF literal 0 HcmV?d00001 diff --git a/ico/www.printables.com.png b/ico/www.printables.com.png new file mode 100644 index 0000000000000000000000000000000000000000..0dbe7eb2f121d36635bfd3b8b7fab3c4b982c248 GIT binary patch literal 229 zcmV^P)P)t-s`e-r# z|Ns5Uw*9r5{mr}lu95!e-}-7a{G@~WY&QFlXa42e`;=|}`S<&HNBfIm`+iUTzNY$d zJ^t|O{G50CbVB~x%=?5`{kow5Sww9B0031m00000NkvXXu0mjf_qb*t literal 0 HcmV?d00001 diff --git a/ico/www.thingiverse.com.png b/ico/www.thingiverse.com.png new file mode 100644 index 0000000000000000000000000000000000000000..28c067d14b189e8330c84d66f16afa30e6310f59 GIT binary patch literal 258 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbL!aez;Vt8({mhNj==9{&^X_^r|n zMeYSY5VpmX-&LFbMlSj@@7UiLpa1{+|9{7|e|-EqQi0mJN`m}?{{w-&)lr7;r_(pQ zH~|zb@pN$vk(iq5?=E!2fP;C8*U4Z1*T?3}@m|B- uuC2)21JYJmXID+Tc6i$5>CgAQ|IcXlh=to`MYAQ)eg;ohKbLh*2~7ZtOmGkY literal 0 HcmV?d00001 diff --git a/ico/youtube.com.png b/ico/youtube.com.png new file mode 100644 index 0000000000000000000000000000000000000000..fc690f5c4683df1dc2b318f038bf0e18b446ec76 GIT binary patch literal 228 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`t36#DLo9liPQJ+7Y{26Zuf&$X zY}DkQz-pG@V%8vN<#avrM$12X;PF3yBN7kp)Z+k8}RwF8v(KowTH{thc{UiFn ze>!+EcsLnweOcZ=$sxh~fWA3@3m4~^`LF(MkyxmIlF?zuJE!XhZ4R3_a@?G7|JIFd zN7rXJm9{3{IMrb&eTku8sZnxC$yB8(1%KZA2R87A+*R0_JoBFW&4xKer!|Y2{8-G_ bR!PsdtZ5ZhexJJ^=xhd0S3j3^P6 @@ -54,7 +55,7 @@ include "parse.php"; echo ''; diff --git a/quotes.php b/quotes.php new file mode 100755 index 0000000..4ac8b9f --- /dev/null +++ b/quotes.php @@ -0,0 +1,43 @@ +loadHTML($html); + + $xpath = new DOMXpath($dom); + $nodes = $xpath->query('//div[@class="' . $classname . '"]'); + + $tmp_dom = new DOMDocument(); + foreach ($nodes as $node) { + $tmp_dom->appendChild($tmp_dom->importNode($node, true)); + break; + } + + return trim($tmp_dom->saveHTML()); +} + +$random = rand()&1; +$url= ''; +$pre_quote = ''; +$quote = ""; +$class = ''; + +if ($random == 0){ + $url = "http://ipfw.ru/bash/random"; + $pre_quote = "from ipfw.ru/bash:

"; + $class = "quotebody"; +}else{ + $url = "http://ibash.org.ru/random.php"; + $pre_quote = "from iBASH:

"; + $class = "quotbody"; +} + $data = ""; + $curl = curl_init(); + curl_setopt_array($curl, array( + CURLOPT_RETURNTRANSFER => 1, + CURLOPT_URL => $url, + CURLOPT_USERAGENT => 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13' + )); + $data = curl_exec($curl); + curl_close($curl); + $quote = $pre_quote.getElementByClassname($data, $class); +?> diff --git a/vars.php b/vars.php old mode 100644 new mode 100755