Login   Register  
PHP Classes
elePHPant
Icontem

i donīt get content

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

      MySite with Wikipedia  >  All threads  >  i don´t get content  >  (Un) Subscribe thread alerts  
Subject:i don´t get content
Summary:Donīt return me nothing
Messages:1
Author:Roberto Castillo
Date:2011-01-25 23:18:29
 

  1. i don´t get content   Reply  
Picture of Roberto Castillo
Roberto Castillo
2011-01-25 23:18:29
Iīm using the get_page_example.php but the problem is that i donīt getting the response completly.

I check the code of the class, and until this part is working right.

public function get_page($name, $header = false)
{
$file = file_get_contents($this->wiki.'/wiki/'.$name);

$file = str_replace('href="/', 'href="'.$this->wiki.'/', $file);

because if i do a "echo $file" this give all the content of the request of wikipedia, but itīs give with menus, etc.

the trouble comes with this sentence

preg_match_all('#<!-- start content -->(.*?)<!-- end content -->#es', $file, $ar);

Because after this, all gets erased.

(Excuse my bad english)

Please if someone can help me