# Wiki Reflection Version: 2.3 ( see http://www.vacilando.org/index.php?x=7065 ) # Open source license: GPL # Make sure to force Unicode for Wikipedia content -- otherwise all foreign scripts will display utter nonsense. This should of course be in your header, though my experimenting shows it may as well stay right here. # Make sure images do not display with a border. $default_title = 'CentrinÄ—_Amerika'; # If you do not specify a title, this will be your default page. $sourceurl = 'http://lt.wikipedia.org/wiki/'; # This URL needs adjusting sometimes. $pathfromroot = substr( $_SERVER['REQUEST_URI'], 0, strpos( $_SERVER['REQUEST_URI'], "?" ) ); $title_wiki = $_GET['title']; if ($title_wiki == "") { $title_wiki = $default_title; } $nicetitle = str_replace( "_", " ", stripslashes( $title_wiki ) ); echo ''; echo ''; echo ''; echo 'Eartykuly: ' . $nicetitle . ''; echo ''; echo ''; echo ''; echo ''; echo ''; function callback( $buffer ) { global $nicetitle; global $title_wiki; global $sourceurl; # Separate the article content $buffer = substr( $buffer, strpos( $buffer, '' ) ); $buffer = substr( $buffer, 0, strpos( $buffer, '
' ) ); # Replace relative links (use another wiki server) $buffer = str_replace( '"/w/skin', '"http://pl.wikipedia.org/w/skin', $buffer ); $buffer = str_replace( '"/skins', '"http://pl.wikipedia.org/skins', $buffer ); # Replace relative links (use this server) $buffer = str_replace( '"/wiki/', '"' . $pathfromroot . '?title=', $buffer ); # Remove edit links $buffer = str_replace( ">edit<", "><", $buffer ); $buffer = str_replace( "[<", "<", $buffer ); $buffer = str_replace( ">]", ">", $buffer ); $buffer = str_replace( 'href="/w/index.php?', 'target="_blank" href="http://pl.wikipedia.org/w/index.php?', $buffer ); # These are typically links to non-existent pages, so the Wikipedia edit page has to open. if ( $buffer <> '' ) { $buffer = '

' . $nicetitle . '


 

Zobacz też:
' . $buffer; } else { $buffer = '

Unfortunately, no content could be extracted!

Return to the previous page or consult the Wikipedia article on "' . $nicetitle . '".'; } return $buffer; } # Your page header comes here...' ob_start("callback"); #include $sourceurl . $title_wiki; $cuu = new CURL; echo $cuu -> get( $sourceurl . $title_wiki ); ob_end_flush(); # Your page footer comes here...' # Define the cURL class: class CURL { var $callback = false; function setCallback($func_name) { $this->callback = $func_name; } function doRequest($method, $url, $vars) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); #curl_setopt($ch, CURLOPT_HEADER, 1); curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']); #curl_setopt($ch, CURLOPT_USERAGENT, 'User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)'); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookie.txt'); curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookie.txt'); if ($method == 'POST') { curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $vars); } $data = curl_exec($ch); curl_close($ch); if ($data) { if ($this->callback) { $callback = $this->callback; $this->callback = false; return call_user_func($callback, $data); } else { return $data; } } else { return curl_error($ch); } } function get($url) { return $this->doRequest('GET', $url, 'NULL'); } function post($url, $vars) { return $this->doRequest('POST', $url, $vars); } } ?>

elewacje Naprawa, przegląd - serwis nissan tanio i profesjonalnie, obsłużymy Twoje auto. namedal Bądź piękny, zadbaj o siebie - fitness wrocław usługi na najwyższym poziomie. Wygląd młodej skóry zapewnia krem nawilżający Ty też możesz być piękna.
Ford puma przeprowadzki warszawa elektroniczny obieg dokumentów akcesoria warsztaty rozwojowe dla kobiet Koszykówka Polska gainer olimp
Pozycjonowanie stron Pozycjonowanie Pozycjonowanie Katowice Profesjonalne pozycjonowanie biuro nieruchomo¶ci legnica Kredyt mieszkaniowy sklep internetowy Powlekanie Mapa Eupatoria bed&breakfast prostowniki