12-12-2008, 12:42 AM
|
#1 (permalink)
|
|
The Addict
Join Date: Jan 2008
Location: los angeles
Posts: 309
Thanks: 44
|
scraping a webpage for text
hello,
i'm trying to make an app that when a user enters a domains name the file_get_contents will scrape only the visible text on the page and display to the user
this is what i've got so far
Code:
<?php
$data = file_get_contents('http://www.gothostin.com/sarmenhb');
$regex = '/[a-zA-z]/';
preg_match($regex,$data,$match);
var_dump($match);
echo $match[1];
?>
but i keep getting something like array{0} or something
what am i doing wrong?
thanks
__________________
no signature set
|
|
|
|