Configuration script which will have domain, function for url validate and check the keywords.
[sourcecode language=”php”]
<?php
define("domain","http://www.google.com");
function getValidateLink($url) {
if(!filter_var($url, FILTER_VALIDATE_URL,FILTER_FLAG_QUERY_REQUIRED)) {
echo domain.$url;
}
}
$strKeywords = '';
if(isset($_GET["q"])) {
$strKeywords = (isset($_GET["q"])) ? $_GET["q"] : "codeasearch.com";
}
?>
[/sourcecode]
Continue reading “search engine result page using curl php”