• Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.
    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

Search Engine

LTomy

Active Coder
Staff Team
Guardian
Web search engine? That is really hard to do. If you need to ask how to do it, you probably do not have the experience/ressources to achieve it.

Basically, you need to analyse pretty much all the pages of all the public websites and then, using the data you compiled from that, you present a list of websites that are relevant to the keywords the person used in its search request.

Anyway, you question is very vague...
 

LTomy

Active Coder
Staff Team
Guardian
Well, okay yeah, that is simpler. But still not easy. What do you want to search? Do you have a list of 'products' or a list of 'articles'? You need to define a criteria that will be used to determine the list of 'articles' or 'products' that are relevent to the search query.
 

Sago

Coder
index.html:
<!DOCTYPE html>
<html>
<head>
<title>cpiy.org</title>
<style>
body {
  background-color: #333333;
  color: white;
  font-family: Verdana;
}
</style>
</head>
<body>
<center>
<h1>cpiy.org<h1>
<h6>If your not on cpiy.org your on a phising site.<h6>
</center>
<center>
<div class="search-container">
    <form action="/">
      <input type="text" placeholder="Search.." name="search">
      
    </form>
</center>
</body>
</html>
Here's my code.
 

Sago

Coder
HTML:
<!DOCTYPE html>
<html>
<head>
<title>pi.org</title>
<style>
body {
  background-color: #333333;
  color: white;
  font-family: Verdana;


</style>
</head>
<body>
<center>
<h1>pi.org<h1>
<h6>If your not on cpiy.org your on a phising site.<h6>
</center>
<center>
  <form action="/form/submit" method="GET">
  <input type="text" name="text" class="#cypi.org/147389%/q" placeholder="Search...">
  <input type="submit" name="submit" class="submit" value="Search">
<h1><a href="https://codeforum.org" target="_blank" title="https://www.codeforum.org/"><span style="color:#FFFFFF;"><span style="font-size:18px;"><span style="font-family:verdana,geneva,sans-serif;">codeforum.org</span></span></span></a></h1>
</form>
</center>
</body>
</html>
 
Last edited:

Sago

Coder
How do I do that then,

JSON:
[{
    "Title": "Google",
    "Description": "Search the web with Google.",
    "Keywords": "search, google, web",
    "URL": "https://www.google.com"
},
{
    "Title": "YouTube",
    "Description": "Watch videos on YouTube",
    "Keywords": "watch, videos, youtube",
    "URL": "https://youtube.com"
}]
Just some of the things.
 

LTomy

Active Coder
Staff Team
Guardian
Well, you could first look if the request matches one of the name of the links (Ex. 'Youtube') and otherwise look for the links that matches the closest (Example, return 'Youtube' if the request is 'outube').
 

Daniel

New Coder
You should probably look at making something a little more straight forward than a search engine 😂

Building a search function is half the problem, you also need to crawl websites and store data about them too...
 
Top