Searching with PHP

One of my students wants to search entries in her project.  Here’s how!


title; ?>

by author; ?> on epoch_time); ?>

content; ?>

PS: If your server complains about ‘file_get_contents’, paste in this function and replace ‘file_get_contents’ with ‘curl_get_contents’

function curl_get_contents($url) {
	$ch = curl_init();
	curl_setopt($ch, CURLOPT_HEADER, 0);
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
	curl_setopt($ch, CURLOPT_URL, $url);
	curl_setopt($ch, CURLOPT_USERAGENT, 'Googlebot/2.1 (+');
	curl_setopt($ch, CURLOPT_REFERER, '');
	curl_setopt($ch, CURLOPT_ENCODING, 'gzip,deflate');
	curl_setopt($ch, CURLOPT_AUTOREFERER, true);
	$data = curl_exec($ch);
	return $data;
People: Jeff Crouse
Tags: Howtus