ameykhandeparkar
-
Posts
3 -
Joined
-
Last visited
Never
Posts posted by ameykhandeparkar
-
-
PHP Meta Search Engine
I am a Student of ME in IT Engineering, I am developing a Meta Search Engine i have developed first Phase of Search Engine ... But my query passing is Static .... Can anyone please help me in how to make it Dynamic plzzzzzzzzzzzzzzzzzzzzzzzzzzz
Here is my code:
/* Html form */
<form action="search.php" method="post" style="margin-top:80px">
<div align="center"><span style="color: #CC0066"><strong style="font:Arial, Helvetica, sans-serif; font-size:36px; text-align:center; text-decoration:none; color:#666666">Ameya Meta QA System</strong></span><br/>
<input name="fname" type="text" size="100px" style="margin-top:20px; margin-bottom:20px"/>
<br/>
<input type="submit" />
</div>
</form>
/* Php Logic */
<?php
function getData($URL){
//Giving the String URL as argument it returns all webpage as a String to you
$allPage = "";
if($URL == null){ //Checking provided URL
echo("<b><font color=\"red\">Please specify a URL to get data from </font></b>");
}
$fp= fopen($URL, r); //Opening Connection
if ( !$fp ) { // Check connection
echo("<b><font color=\"red\">Connection Failed</font></b>");
}
else{
$num=0;
while ( !feof($fp) ){
$pageText[$num] = fread($fp,1024);// read WebPage
$num++;
}
//endwhile;
}
$arrayLen=count($pageText);
for($i=0; $i<$arrayLen; $i++){
$allPage=$allPage.$pageText[$i];
}
fclose($fp);
return $allPage;
}
//===Example of usage of function===
echo(getData("http://www.answers.com/topic/barack-obama"));
echo(getData("http://en.wikipedia.org/w/index.php?title=Special%3ASearch&search=who+is+obama+%3F&button="));
echo(getData("http://www.chacha.com/search/who+is+obama+%3F"));
?>
-
i want to post a string from HTML form to multiple search engines and get the search results in my form, can nyone guide me how to do it plzzzzzzzzzzzz,
PHP Meta Search Engine Help .. nid to make query dynamic ...
in PHP Coding Help
Posted
my dear friend, i am trying to store the query in a variable and pass that variable in the echo function instead of statically passing the query .... but because the different search engines have different criterian to allow to pass query to them .. i am stuck