예제 #1
0
        $img = $sw->addChild("image");
        $img[0] = getConfig("localpath.url") . "proxy.php?swimageid=" . $sw->attributes()->id;
        return $sw->asXML();
    }
    return $response;
}
if (isset($_GET["type"]) && trim($_GET["type"]) === "release" && isset($_GET["id"]) && is_numeric($_GET["id"])) {
    $url = getConfig("release.url", array("releaseid" => trim($_GET["id"])));
    $headers = getConfig("release.headers");
} else {
    if (isset($_GET["type"]) && trim($_GET["type"]) === "sw" && isset($_GET["id"]) && is_numeric($_GET["id"])) {
        $url = getConfig("software.url", array("swid" => trim($_GET["id"])));
        $headers = getConfig("software.headers");
        $cb = 'transformSoftware';
    } else {
        if (isset($_GET["type"]) && trim($_GET["type"]) === "series" && isset($_GET["id"]) && is_numeric($_GET["id"])) {
            $url = getConfig("series.url", array("seriesid" => trim($_GET["id"])));
            $headers = getConfig("series.headers");
        } else {
            if (isset($_GET["swimageid"]) && is_numeric($_GET["swimageid"])) {
                $url = getConfig("swimage.url", array("swimageid" => trim($_GET["swimageid"])));
                $headers = getConfig("swimage.headers");
            }
        }
    }
}
if (trim($url) !== "") {
    echoFetchedData($url, $headers, $cb);
} else {
    header("Status: 404 Not Found");
}
예제 #2
0
<?php

/**
 * Copyright (C) 2015 IASA - Institute of Accelerating Systems and Applications (http://www.iasa.gr)
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and 
 * limitations under the License.
 */
include "config.php";
$url = getConfig("feed.url");
$headers = getConfig("feed.headers");
echo echoFetchedData($url, $headers);