Extension:YahooMaps/yproxy.php

From MediaWiki.org
Jump to: navigation, search
<?php
  header("Content-type: text/plain\n\n");
  $url = $_SERVER['QUERY_STRING'];
 
  //strpos allows only calls to specified endpoint
  if ( strpos($url,"http://api.local.yahoo.com/") === 0) {
    $ch = curl_init($url);
    // Add your proxy information, if necessary
    //curl_setopt($ch, CURLOPT_PROXY, "yourproxy.yourhost.com");
    //curl_setopt($ch, CURLOPT_PROXYPORT, 80);     
    curl_exec($ch);
    $c = curl_close($ch);
  }
Personal tools
Namespaces
Variants
Actions
Site
Support
Download
Development
Communication
Print/export
Toolbox