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 @@ + @@ -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