summaryrefslogtreecommitdiffstats
path: root/prog
diff options
context:
space:
mode:
authorAnton Luka Šijanec <anton@sijanec.eu>2024-04-15 10:33:24 +0200
committerAnton Luka Šijanec <anton@sijanec.eu>2024-04-15 10:33:24 +0200
commit1ffa25152f18588b381fa9260f437f07d9a04003 (patch)
tree99b688314ca245b80185798e12f1e3450eb2a667 /prog
parentdn05p2 (diff)
downloadr-1ffa25152f18588b381fa9260f437f07d9a04003.tar
r-1ffa25152f18588b381fa9260f437f07d9a04003.tar.gz
r-1ffa25152f18588b381fa9260f437f07d9a04003.tar.bz2
r-1ffa25152f18588b381fa9260f437f07d9a04003.tar.lz
r-1ffa25152f18588b381fa9260f437f07d9a04003.tar.xz
r-1ffa25152f18588b381fa9260f437f07d9a04003.tar.zst
r-1ffa25152f18588b381fa9260f437f07d9a04003.zip
Diffstat (limited to 'prog')
-rw-r--r--prog/sear.php/index.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/prog/sear.php/index.php b/prog/sear.php/index.php
index 1f90c9c..2e695c5 100644
--- a/prog/sear.php/index.php
+++ b/prog/sear.php/index.php
@@ -59,6 +59,8 @@ function query_google ($s, $image = false, $noredirect = false, $bindstring = fa
}
$results = [];
$x = new DOMDocument();
+ // file_put_contents("/tmp/x", $txtdoc);
+ $txtdoc = mb_convert_encoding($txtdoc, "ISO-8859-1");
$x->loadHTML($txtdoc);
if ($image)
foreach ($x->getElementsByTagName("div") as $div) {