Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCHv5 1/5] Scripts to install, delete and clear a MediaWiki

From: Matthieu Moy <hidden>
Date: 2016-06-15 22:54:04

Simon Cathebras [off-list ref] writes:
+function get ($page_name = "") {
+        $curl = curl_init();
+        $page_name_add = "";
+        if ($page_name != "") {
+                $page_name_add = '?page='.$page_name;
+        }
+	$url = $GLOBALS['url'].$page_name_add;
+        $tmp_cookie=$GLOBALS['tmp_cookie'];
+        curl_setopt($curl, CURLOPT_COOKIEJAR, $tmp_cookie);
+        curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
+        curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
+        curl_setopt($curl, CURLOPT_COOKIEFILE, $tmp_cookie);
+        curl_setopt($curl, CURLOPT_HEADER, true);
+        curl_setopt($curl, CURLOPT_URL,$url);
+
+        $page = curl_exec($curl);
+        curl_close($curl);
+        return $page;
+}
Mixed tab/space indentation.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help