PHP Classes

i donīt get content

Recommend this page to a friend!

      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
Author:Roberto Castillo
Date:2011-01-25 23:18:29

  1. i donīt get content   Reply   Report abuse  
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