matthew9090 Posted November 23, 2010 Share Posted November 23, 2010 i am making a search engine and i need help because i need it so you submit your url then it automatically scrolls it for the description and keywords then puts it in the database. my html code: <form action="submit_url.php" method="get"> <input type="text" name="url" value="url" /> <input type="submit" name="submit" value="submit" /> </form> php code so far: <html> <head> <title>submitting url: <?php $url = $_GET['url']; echo $url; ?></title> <link href="style.css" rel="stylesheet" type="text/css" /> </head> <body> <?php echo "Submitting <b>$url</b>"; $url = fopen("http://knexideas.co.cc", "r") or exit("Unable to open"); while (!feof($url)) { fgetc($url); } fclose($url); ?> </body> </html> all it does is reads the website if you put 'echo $url' at the bottom it just reads and prints the web page. Quote Link to comment https://forums.phpfreaks.com/topic/219620-php-web-spiderbot/ Share on other sites More sharing options...
sqlnoob Posted November 23, 2010 Share Posted November 23, 2010 i don't see anything in the code what you're trying to describe. what exactly is your problem? can you be more specific? Quote Link to comment https://forums.phpfreaks.com/topic/219620-php-web-spiderbot/#findComment-1138686 Share on other sites More sharing options...
matthew9090 Posted November 24, 2010 Author Share Posted November 24, 2010 i am making a search engine and i need it so when you submit your url it scrolls the page for any keywords and descriptions and puts that into the database Quote Link to comment https://forums.phpfreaks.com/topic/219620-php-web-spiderbot/#findComment-1138988 Share on other sites More sharing options...
jdavidbakr Posted November 24, 2010 Share Posted November 24, 2010 i am making a search engine and i need it so when you submit your url it scrolls the page for any keywords and descriptions and puts that into the database Currently you're not processing the page at all as you read it. You've got a lot of code to write still. Quote Link to comment https://forums.phpfreaks.com/topic/219620-php-web-spiderbot/#findComment-1139004 Share on other sites More sharing options...
jim_keller Posted November 24, 2010 Share Posted November 24, 2010 if you need to parse an HTML page, it's probably worth looking at simplehtmldom, which makes the process much much easier: http://simplehtmldom.sourceforge.net/ Quote Link to comment https://forums.phpfreaks.com/topic/219620-php-web-spiderbot/#findComment-1139006 Share on other sites More sharing options...
matthew9090 Posted November 24, 2010 Author Share Posted November 24, 2010 if you need to parse an HTML page, it's probably worth looking at simplehtmldom, which makes the process much much easier: http://simplehtmldom.sourceforge.net/ it comes up with an error for this line: $html = file_get_html('http://www.google.com/'); Fatal error: Call to undefined function file_get_html() in C:\wamp\www\usearch\submit_url.php on line 12 Quote Link to comment https://forums.phpfreaks.com/topic/219620-php-web-spiderbot/#findComment-1139010 Share on other sites More sharing options...
jim_keller Posted November 24, 2010 Share Posted November 24, 2010 ...did you download simplehtmldom and include it in your script before trying to use it? Quote Link to comment https://forums.phpfreaks.com/topic/219620-php-web-spiderbot/#findComment-1139024 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.