how to echo data that we read with file_get_contents
- by Ronnie Chester Lynwood
hello. im trying to echo YH if $url contains http://yahoo.com/ ! how can i do it? I've tried something like this;
$url = "'".$get['url']."'";
$needle = "http://yahoo.com/";
$contents = file_get_contents($url);
if(stripos($contents, $needle) !== false) {
$qqq = "YH";
}
but it's not working. can anybody help me with true syntax? thanks..