$_GET['position']); //to know all parameters use: print_r($_SERVER); $teste = $_SERVER["SCRIPT_NAME"]; //also PHP_SELF $positionAux = "/index.html"; //echo "$teste"; //$teste="/links/ARTE_CULTURA/FILOSOFIA/index.html"; $positionAux = substr($teste, 6); $param = array('position' => $positionAux); /* Create a new client by providing the endpoint to the * constructor. */ $client = new soapclientRui($url); //$client->debub_flag = 1; /* Call the directoryPage() function, passing the parameter list. */ $response = $client->call('directoryPage', $param); /* handle any SOAP faults. */ if ($client->fault) { echo "FAULT:
Code: {$client->faultcode}
";
   echo "String: {$client->faultstring}";
} 
else 
{
}
  $iPosition= $response['iPosition'];
  $uRecordsInPage = $response['uRecordsInPage'];
  $records = $response['records'];
  $recordsBroken = $response['records_broken'];
  $sections = $response['sections'];
  $iNumberOfSections = $response['iNumberOfSections'];
  $subSections = $response['subSections'];
  $iNumberOfSubSections = $response['iNumberOfSubSections'];
  $nextPages = $response['nextPages'];
  $iNumberOfRecords = $response['iNumberOfRecords'];
  $iNumberOfRecordsBroken = $response['iNumberOfRecordsBroken'];
  $cpLinkCountryUrl = $response['cpLinkCountryUrl'];
  $cpLinkCountryName = $response['cpLinkCountryName'];
?>
if($_SERVER["REMOTE_ADDR"] == "213.41.87.200" || 
   $_SERVER["REMOTE_ADDR"] == "212.155.198.14")
{  
  print "\n";
    print "Your Site is indexing our site in an incorrect way. Please contact indexing@netindex.pt\n";
      print "\n";  
        //print "vou-me embora";
	  return 1;
	  }
?>
     | 
| Directório | echo date("d M Y", mktime());?> | 
| SubSecções | 
| }//for ?> | 
}//if ($iNumberOfSubSections != 0) ?>
| Links Patrocinados | 
| \n"; print "\n"; print " \n"; } ?> | 
     | 
| Páginas | 
| 
  ";
  // parse the $records[] array and extract the necessary information 
  foreach ($records as $i)
  {// retirado /cgi-bin/r?url=
?>  echo $i['cpTitle']; ?> :  echo $i['cpDescription']; ?> } print "  | 
"; print "
| Páginas que já não funcionam. Dentro de algum tempo serão removidas definitivamente. | 
| 
  ";
  // parse the $recordsBroken[] array and extract the necessary information 
  foreach ($recordsBroken as $i)
  {
?>  echo $i['cpTitle']; ?>:  echo $i['cpDescription']; ?> echo $i['cpUrl']; ?> } print "  | 
\n"; echo "
| Links Patrocinados | 
| \n"; echo "\n"; echo "\n"; echo " | 
Copyright NetINDEX 1997-2014 v430 M1219