CPSearchX is a simple search engine web application that allows users to search the web using the Google Custom Search API. It provides search results in a user-friendly interface with pagination and basic styling.
To preview CPSearchX, you can visit the live demo here.
- Search Bar: Allows users to input search queries.
- Search Results: Displays search results including title, link, and snippet.
- Pagination: Enables loading more results dynamically.
- Responsive Design: Supports different screen sizes.
- Frontend: HTML, CSS, JavaScript
- Backend: PHP
- API: Google Custom Search API
- index.php: Main HTML and PHP file handling frontend and backend logic.
- load.php: PHP script handling AJAX requests to fetch search results.
- main.js: JavaScript file for dynamic interaction and AJAX handling.
- style.css: CSS file for styling the interface.
- Clone the repository:
git clone https://github.com/h4jack/cpsearchx.git
-
Configure your web server (e.g., Apache) to serve the files.
-
Obtain a Google Custom Search API key and replace
$apiKey
and$cx
inload.php
with your own credentials. -
Access the application through your web browser.
- Enter a search query in the provided search bar.
- Click on the "Search" button or press Enter to fetch results.
- Scroll through the results and click on links to visit the corresponding websites.
- Use pagination to load more search results.
This project was developed as a learning exercise to implement AJAX-based search functionality using PHP and JavaScript.
This project is licensed under the MIT License
If you have any feedback or suggestions, please feel free to create an issue or contact us.