Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Como transpor esse codigo para o ASP ??
<?php$rss = $_GET['rss'];// make sure that some page is really being calledif ($rss && $rss != ""){ // make sure that an http call is being made - otherwise there's access to any file on machine... if ((strpos($rss, "http://") === 0) || (strpos($rss, "https://") === 0)){ readfile($rss); }}?>
ou esse aqui .... presciso de um dos 2 !!!
<?php//code credit DmS, dmsproject.com$feedURL = $_POST['rss'];$feedURL = trim($feedURL);//verify that this request is okayif(verifyLink($feedURL)) { //if it clears, proceed to read the remote document readfile($feedURL); }function verifyLink($requestedURL) { //locate the XML file containing the Flash menu data //if your XML file has a different name or location, modify $path $path = './feedList.xml'; //start by assuming this request is a hoax $authorized = false; //use file() to strip the XML tags and populate an array with what remains $approvedList = file($path); //loop through every item in $approvedList array foreach($approvedList as $url) { //using the $url enumerator, compare items in $approvedList //against the requested URL ($feedURL). If a match is found, //it's okay; otherwise don't permit the request if(strstr ($url, $requestedURL)) { $authorized = true; break; } } return $authorized;}?>Carregando comentários...