Guest User

Search Masiv

a guest
Apr 3rd, 2022
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.78 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4.     <title>Search Masiv</title>
  5.     <meta charset="utf-8">
  6. </head>
  7. <body>
  8.     <?php
  9.     $magazine = array();
  10.     $magazine[] = 'https://www.emag.ro/search/{q}?ref=effective_search';
  11.     $magazine[] = 'https://www.fashiondays.ro/search/?q={q}';
  12.     $magazine[] = 'https://www.elefant.ro/search?SearchTerm={q}&StockAvailability=true';
  13.    
  14.     if(isset($_POST['ok'])) {
  15.         foreach($magazine AS $magazin) {
  16.             $url = str_replace('{q}',$_POST['q'],$magazin);
  17.             echo"<script>window.open('{$url}', '_blank');</script>";
  18.         }
  19.     }
  20.     ?>
  21.     <form method="post" action="">
  22.         <input type="text" name="q" required/> <input type="submit" name="ok" value="Search"/>
  23.     </form>
  24.  
  25.     <!-- made by Afiliatti.ro -->
  26. </body>
  27. </html>
Advertisement
Add Comment
Please, Sign In to add comment