How to perform a google search from your website


#1

#INTRODUCTION


Want to perform a google search from your textbox in your website? Today we'll learn how to do this.

/!\ Make sure you are using php 5.6
#THE TUTORIAL


Create a file called gsearch.php And add the following content to it ``` <?php if(isset($_POST['search'])){ $s = $_POST['s']; header('Location: https://google.co.uk/#q='.$s); exit; } ?> Google search ``` ##**EXPLANATION** The user enters his search query in this form, wich sends it to the php code, that gets the query, and redirects to https://google.co.uk/#q=thequery

#IN THE END


Hope you enjoyed this tutorial, and if it worked for you, give it a thumbs up by clicking the like button.
If you need any more help, you can create a new topic here, and we will be happy to help you!


Black Friday Sale 90% OFF
0
DAYS
0
HOURS
0
MINUTES
0
SECONDS
×