• Home
  • Forum
  • Fare Web
  • PHP

google in php

  • Creatore Discussione Creatore Discussione uffiolino
  • Data di inizio Data di inizio 21 Ott 2006
U

uffiolino

Nuovo Utente
21 Ott 2006
1
0
0
  • 21 Ott 2006
  • #1
ciao a tutti, questo è una specie di motore di ricerca che funziona tramite google e salva i siti trovati in un txt. Ma vedo che è limitato..cioè non mi cerca molti siti come fa sul browser, si può modificare?






<?
########################
# google v2.0 #
# Versione in php #
########################

if (!empty($_GET['q']))
{
$hora = date("H:i:s"); $dia = date("m-d-y");
$ip = $_SERVER['REMOTE_ADDR'];
$SITEs = $ip.'-'.str_replace(":", "", $hora).str_replace("-", "", $dia).'.txt';

echo "<body onload=\"window.location='page.php?id=0&sites={$SITEs}';\">\n";
echo "Attendere qualche minuto!<br>\n";
@set_time_limit(0);

function allstring($SITE) {
$ALL[0] = parse_url($SITE);
if (!empty($ALL[0]['query'])) {
$ALL[1] = explode("=", $ALL[0]['query']);
$ALL[2] = 1;
$ALL[3] = '';
$RESULTS = '';
while ($ALL[2] <= count($ALL[1])-1) {
if (!empty($ALL[1][$ALL[2]])) {
if (@eregi("&", $ALL[1][$ALL[2]])) {
$ALL[4] = explode("&", $ALL[1][$ALL[2]]);
$ALL[4] = $ALL[4][0];
} else {
$ALL[4] = $ALL[1][$ALL[2]];
}
$ALL[3] = str_replace($ALL[4], "[CMD]", $ALL[0]['query']);
$RESULTS .= str_replace($ALL[0]['query'], $ALL[3], $SITE)."\n";
}
$ALL[2]++;
}
return $RESULTS;
}
}


function filter($TEXT)
{
$CHAVE[1] = "<a class=l href=\"";
$CHAVE[2] = "\"";
$SITE = explode($CHAVE[1], $TEXT);
$cSITE = count($SITE)-1;
$rSITES = '';
for ($x = 1;$x <= $cSITE;$x++)
{
$rSITE = explode($CHAVE[2], $SITE[$x]);
$aSITE = str_replace("", "", $rSITE[0]);
$rSITES .= allstring(strip_tags($aSITE));
}
return $rSITES;
}
function write($A, $B) {
@touch($A);
$C = fopen($A, 'a');
fwrite($C, $B);
fclose($C);
}
for ($n = 0;$n < 900;$n+=10)
{

$URL = "www.google.com";
$PORT = "80";
$TIMEOUT = 30; // Padrão
/* Não modifique isso */
$Q = $_GET['q'];
$GET = '/custom?q='.urlencode($Q).'+&hl=en&lr=&ie=UTF-8&cof=BGC:%23FFFFFF%3BT:%23000000%3BLC:%230000CC%3BVLC:%230000CC%3BALC:%230000CC%3BGALT:%23008000%3BGFNT:%23000000%3BGIMP:%23000000%3BDIV:%230000CC%3BLBGC:%23FFFFFF%3B&start='.$n.'&sa=N';
$fp = fsockopen($URL, $PORT, $errno, $errstr, $TIMEOUT);

if (!$fp)
{
echo "Errore nella connessione al sito {$URL}<br>\n";
} else
{
$out = "GET $GET HTTP/1.1\r\n";
$out .= "Host: $URL\r\n";
$out .= "Connection: Close\r\n\r\n";
fwrite($fp, $out);
$buffer = '';
while (!feof($fp))
{
$buffer .= fgets($fp, 128);
}
fclose($fp);
write($SITEs, filter($buffer));

}
}
} else
{
exit;
}
?>
 
Devi accedere o registrarti per poter rispondere.

Discussioni simili

L
Google chart php mysql
  • luigithen
  • 29 Set 2020
  • PHP
Risposte
2
Visite
3K
PHP 30 Set 2020
luigithen
L
R
Tradurre stringhe con php e google translator
  • Roberto_V
  • 6 Lug 2020
  • PHP
Risposte
4
Visite
3K
PHP 7 Lug 2020
Alex_70
  • Bloccata
[PHP] Google
  • ANDREA20
  • 25 Ott 2018
  • PHP
Risposte
1
Visite
1K
PHP 26 Ott 2018
Max 1
[PHP] Iframe Google Maps
  • Tommy03
  • 23 Ago 2018
  • PHP
Risposte
1
Visite
2K
PHP 23 Ago 2018
Max 1
Da .htm a .php, perdo le mie posizioni su Google ricerca?
  • andreas88
  • 24 Gen 2018
  • SEO e Posizionamento
Risposte
9
Visite
2K
SEO e Posizionamento 23 Ott 2018
Salvatore HeadWolf
S
L
[PHP] Inserire google recaptcha in uno form contatti
  • luigi777
  • 12 Ago 2017
  • PHP
Risposte
1
Visite
3K
PHP 13 Ago 2017
luigi777
L
G
Google recaptcha in verify.php - dove inserire il codice
  • giumazzi
  • 20 Mar 2017
  • PHP
Risposte
1
Visite
2K
PHP 21 Mar 2017
giumazzi
G
S
[PHP] Qualcuno utilizza i grafici Google charts?
  • samurai.sette
  • 2 Ago 2016
  • PHP
Risposte
1
Visite
2K
PHP 3 Ago 2016
samurai.sette
S
[PHP] [HTML] Google Maps con due indirizzi
  • base90
  • 1 Lug 2016
  • PHP
Risposte
12
Visite
3K
PHP 25 Lug 2016
cris8380
L
Google maps aggiunta makers da php
  • lelemkop
  • 15 Lug 2015
  • Javascript
Risposte
4
Visite
2K
Javascript 17 Lug 2015
lelemkop
L
T
PHP sync con gmail, rubrica google e calendario google
  • temino
  • 23 Feb 2015
  • PHP
Risposte
0
Visite
2K
PHP 23 Feb 2015
temino
T
Inserire grafico google analytics in pagina PHP
  • neo996sps
  • 21 Giu 2013
  • Google Analytics
Risposte
0
Visite
2K
Google Analytics 21 Giu 2013
neo996sps
G
criptare ifarme di google fusion table in una pagina php
  • gobas
  • 4 Apr 2013
  • PHP
Risposte
7
Visite
2K
PHP 27 Apr 2013
gobas
G
google, php,API
  • Sargon
  • 14 Gen 2013
  • PHP
Risposte
2
Visite
2K
PHP 14 Gen 2013
borgo italia
D
Google Webmaster Tools Api in php
  • drum79
  • 3 Ago 2012
  • Google Search Console
Risposte
0
Visite
2K
Google Search Console 3 Ago 2012
drum79
D
Google maps mysql php
  • Sargon
  • 19 Mag 2012
  • PHP
Risposte
3
Visite
2K
PHP 20 Mag 2012
Sargon
google maps java-xml-php-mysql
  • Sargon
  • 17 Mag 2012
  • Javascript
Risposte
0
Visite
2K
Javascript 17 Mag 2012
Sargon
C
script php per posizionamento su google
  • chuckjak
  • 7 Gen 2012
  • PHP
Risposte
0
Visite
2K
PHP 7 Gen 2012
chuckjak
C
Google maps + db mysql + php
  • neo996sps
  • 18 Dic 2011
  • PHP
Risposte
0
Visite
3K
PHP 18 Dic 2011
neo996sps
M
interfaccia php a google calendar
  • maced
  • 30 Nov 2011
  • PHP
Risposte
16
Visite
5K
PHP 6 Dic 2011
maced
M
Condividi:
Facebook X (Twitter) LinkedIn WhatsApp e-mail Condividi Link
  • Home
  • Forum
  • Fare Web
  • PHP
  • Italiano
  • Termini e condizioni d'uso del sito
  • Policy Privacy
  • Aiuto
  • Home
Community platform by XenForo® © 2010-2024 XenForo Ltd. | Traduzione a cura di XenForo Italia
Menu
Accedi

Registrati

  • Home
  • Forum
    • Nuovi Messaggi
    • Cerca...
  • Novità
    • Featured content
    • Nuovi Messaggi
    • Ultime Attività
X

Privacy & Transparency

We use cookies and similar technologies for the following purposes:

  • Personalized ads and content
  • Content measurement and audience insights

Do you accept cookies and these technologies?

X

Privacy & Transparency

We use cookies and similar technologies for the following purposes:

  • Personalized ads and content
  • Content measurement and audience insights

Do you accept cookies and these technologies?