Index: trunk/admin/include/languages.class.php
===================================================================
--- trunk/admin/include/languages.class.php	(revision 8082)
+++ trunk/admin/include/languages.class.php	(revision 8083)
@@ -197,11 +197,14 @@
     global $user;
 
-    $pem_category_id = 8;
+    $get_data = array(
+      'category_id' => 8,
+      'format' => 'php',
+    );
 
     // Retrieve PEM versions
     $version = PHPWG_VERSION;
     $versions_to_check = array();
-    $url = PEM_URL . '/api/get_version_list.php?category_id='.$pem_category_id.'&format=php';
-    if (fetchRemote($url, $result) and $pem_versions = @unserialize($result))
+    $url = PEM_URL . '/api/get_version_list.php';
+    if (fetchRemote($url, $result, $get_data) and $pem_versions = @unserialize($result))
     {
       if (!preg_match('/^\d+\.\d+\.\d+/', $version))
@@ -224,9 +227,13 @@
 
     // Retrieve PEM languages infos
-    $url = PEM_URL . '/api/get_revision_list.php?category_id='.$pem_category_id.'&format=php&last_revision_only=true';
-    $url .= '&version=' . implode(',', $versions_to_check);
-    $url .= '&lang='.$user['language'];
-
-    if (fetchRemote($url, $result))
+    $url = PEM_URL . '/api/get_revision_list.php';
+    $get_data = array_merge($get_data, array(
+      'last_revision_only' => 'true',
+      'version' => implode(',', $versions_to_check),
+      'lang' => $user['language'],
+      )
+    );
+
+    if (fetchRemote($url, $result, $get_data))
     {
       $pem_languages = @unserialize($result);
@@ -259,8 +266,11 @@
     if ($archive = tempnam( PHPWG_ROOT_PATH.'language', 'zip'))
     {
-      $url = PEM_URL . '/download.php?rid=' . $revision;
-      $url .= '&origin=piwigo_' . $action;
-
-      if ($handle = @fopen($archive, 'wb') and fetchRemote($url, $handle))
+      $url = PEM_URL . '/download.php';
+      $get_data = array(
+        'rid' => $revision,
+        'origin' => 'piwigo_'.$action,
+      );
+
+      if ($handle = @fopen($archive, 'wb') and fetchRemote($url, $handle, $get_data))
       {
         fclose($handle);
Index: trunk/admin/include/plugins.class.php
===================================================================
--- trunk/admin/include/plugins.class.php	(revision 8082)
+++ trunk/admin/include/plugins.class.php	(revision 8083)
@@ -291,9 +291,14 @@
     global $user;
 
+    $get_data = array(
+      'category_id' => 12,
+      'format' => 'php',
+    );
+
     // Retrieve PEM versions
     $version = PHPWG_VERSION;
     $versions_to_check = array();
-    $url = PEM_URL . '/api/get_version_list.php?category_id=12&format=php';
-    if (fetchRemote($url, $result) and $pem_versions = @unserialize($result))
+    $url = PEM_URL . '/api/get_version_list.php';
+    if (fetchRemote($url, $result, $get_data) and $pem_versions = @unserialize($result))
     {
       if (!preg_match('/^\d+\.\d+\.\d+/', $version))
@@ -326,15 +331,25 @@
 
     // Retrieve PEM plugins infos
-    $url = PEM_URL . '/api/get_revision_list.php?category_id=12&format=php&last_revision_only=true';
-    $url .= '&version=' . implode(',', $versions_to_check);
-    $url .= '&lang=' . substr($user['language'], 0, 2);
-    $url .= '&get_nb_downloads=true';
+    $url = PEM_URL . '/api/get_revision_list.php';
+    $get_data = array_merge($get_data, array(
+      'last_revision_only' => 'true',
+      'version' => implode(',', $versions_to_check),
+      'lang' => substr($user['language'], 0, 2),
+      'get_nb_downloads' => 'true',
+      )
+    );
 
     if (!empty($plugins_to_check))
     {
-      $url .= $new ? '&extension_exclude=' : '&extension_include=';
-      $url .= implode(',', $plugins_to_check);
-    }
-    if (fetchRemote($url, $result))
+      if ($new)
+      {
+        $get_data['extension_exclude'] = implode(',', $plugins_to_check);
+      }
+      else
+      {
+        $get_data['extension_include'] = implode(',', $plugins_to_check);
+      }
+    }
+    if (fetchRemote($url, $result, $get_data))
     {
       $pem_plugins = @unserialize($result);
@@ -387,8 +402,11 @@
     if ($archive = tempnam( PHPWG_PLUGINS_PATH, 'zip'))
     {
-      $url = PEM_URL . '/download.php?rid=' . $revision;
-      $url .= '&origin=piwigo_' . $action;
-
-      if ($handle = @fopen($archive, 'wb') and fetchRemote($url, $handle))
+      $url = PEM_URL . '/download.php';
+      $get_data = array(
+        'rid' => $revision,
+        'origin' => 'piwigo_'.$action,
+      );
+
+      if ($handle = @fopen($archive, 'wb') and fetchRemote($url, $handle, $get_data))
       {
         fclose($handle);
Index: trunk/admin/include/themes.class.php
===================================================================
--- trunk/admin/include/themes.class.php	(revision 8082)
+++ trunk/admin/include/themes.class.php	(revision 8083)
@@ -448,11 +448,14 @@
     global $user;
 
-    $pem_category_id = 10;
+    $get_data = array(
+      'category_id' => 10,
+      'format' => 'php',
+    );
 
     // Retrieve PEM versions
     $version = PHPWG_VERSION;
     $versions_to_check = array();
-    $url = PEM_URL . '/api/get_version_list.php?category_id='.$pem_category_id.'&format=php';
-    if (fetchRemote($url, $result) and $pem_versions = @unserialize($result))
+    $url = PEM_URL . '/api/get_version_list.php';
+    if (fetchRemote($url, $result, $get_data) and $pem_versions = @unserialize($result))
     {
       if (!preg_match('/^\d+\.\d+\.\d+/', $version))
@@ -485,15 +488,25 @@
 
     // Retrieve PEM themes infos
-    $url = PEM_URL . '/api/get_revision_list.php?category_id='.$pem_category_id.'&format=php&last_revision_only=true';
-    $url .= '&version=' . implode(',', $versions_to_check);
-    $url .= '&lang=' . substr($user['language'], 0, 2);
-    $url .= '&get_nb_downloads=true';
+    $url = PEM_URL . '/api/get_revision_list.php';
+    $get_data = array_merge($get_data, array(
+      'last_revision_only' => 'true',
+      'version' => implode(',', $versions_to_check),
+      'lang' => substr($user['language'], 0, 2),
+      'get_nb_downloads' => 'true',
+      )
+    );
 
     if (!empty($themes_to_check))
     {
-      $url .= $new ? '&extension_exclude=' : '&extension_include=';
-      $url .= implode(',', $themes_to_check);
-    }
-    if (fetchRemote($url, $result))
+      if ($new)
+      {
+        $get_data['extension_exclude'] = implode(',', $themes_to_check);
+      }
+      else
+      {
+        $get_data['extension_include'] = implode(',', $themes_to_check);
+      }
+    }
+    if (fetchRemote($url, $result, $get_data))
     {
       $pem_themes = @unserialize($result);
@@ -547,8 +560,11 @@
     if ($archive = tempnam( PHPWG_THEMES_PATH, 'zip'))
     {
-      $url = PEM_URL . '/download.php?rid=' . $revision;
-      $url .= '&origin=piwigo_' . $action;
-
-      if ($handle = @fopen($archive, 'wb') and fetchRemote($url, $handle))
+      $url = PEM_URL . '/download.php';
+      $get_data = array(
+        'rid' => $revision,
+        'origin' => 'piwigo_'.$action,
+      );
+
+      if ($handle = @fopen($archive, 'wb') and fetchRemote($url, $handle, $get_data))
       {
         fclose($handle);
Index: trunk/admin/site_manager.php
===================================================================
--- trunk/admin/site_manager.php	(revision 8082)
+++ trunk/admin/site_manager.php	(revision 8083)
@@ -117,7 +117,9 @@
       {
         $clf_url = $url.'create_listing_file.php';
-        $clf_url.= '?action=test';
-        $clf_url.= '&version='.PHPWG_VERSION;
-        if (fetchRemote($clf_url, $result))
+        $get_data = array(
+          'action' => 'test',
+          'version' => PHPWG_VERSION,
+        );
+        if (fetchRemote($clf_url, $result, $get_data))
         {
           $lines = explode("\r\n", $result);
