|
|||||||
|
|
|
![]() |
|
|
Strumenti |
|
|
#1 |
|
Senior Member
Iscritto dal: Sep 2001
Città: Vicopisano (PI)
Messaggi: 11652
|
PHP - lettura pagine web
Ciao a tutti,
mi servirebbero dei pareri su script per leggere il contenuto di una pagina web. Io ho queste 2 funzioni: Codice PHP:
Codice PHP:
Codice:
HTTP/1.1 200 OK Date: Wed, 27 Apr 2005 16:00:00 GMT Server: Apache/1.3.33 (Unix) mod_fastcgi/2.4.0 PHP/4.3.10 X-Powered-By: PHP/4.3.10 Last-Modified: Wed, 27 Apr 2005 15:40:18 GMT Expires: Wed, 27 Apr 2005 17:40:18 GMT Cache-Control: public, max-age=7200 Connection: close Content-Type: text/html ![]() Quale delle due funzioni è più efficente nel caso di molte letture consecutive? Ce ne sono altre ancora meglio?
__________________
>>PARTECIPA AI PROGETTI DI CALCOLO DISTRIBUITO CON BOINC.Italy!<<
You may say I'm a dreamer - But I'm not the only one - I hope someday you'll join us - And the team will be the 1# one BoincEmperor 1° Livello - Rotoloni DOCET!! Cactus rulez!! ![]() |
|
|
|
|
|
#2 |
|
Senior Member
Iscritto dal: Apr 2000
Città: Vicino a Montecatini(Pistoia) Moto:Kawasaki Ninja ZX-9R Scudetti: 29
Messaggi: 53971
|
Questo è un terzo metodo:
$html = implode('', file ('http://www.example.com/')); E' normale che il secondo metodo ti inserisca gli header HTTP visto che è una connessione tramite socket... E' praticamente il risultato che otterresti connettendoti tramite telnet... Attenzione che non tutti gli spazi web supportano la possibilità di passare un $url a file e fopen...ancora meno spazi web supportano i socket... |
|
|
|
|
|
#3 | ||
|
Senior Member
Iscritto dal: Sep 2001
Città: Vicopisano (PI)
Messaggi: 11652
|
Quote:
![]() Ma è indifferente usare una delle 3? Quali sono i pro/contro a parte che la seconda mette gli header HTTP? Dovendo fare molte letture consecutive (tipo 200 pagine con pochi dati ciascuna) quale è più indicato? Quote:
) per esempio sullo spazio di hwu che evvivad m'ha dato non funzionano i socket
__________________
>>PARTECIPA AI PROGETTI DI CALCOLO DISTRIBUITO CON BOINC.Italy!<<
You may say I'm a dreamer - But I'm not the only one - I hope someday you'll join us - And the team will be the 1# one BoincEmperor 1° Livello - Rotoloni DOCET!! Cactus rulez!! ![]() |
||
|
|
|
|
|
#4 | |
|
Senior Member
Iscritto dal: Apr 2000
Città: Vicino a Montecatini(Pistoia) Moto:Kawasaki Ninja ZX-9R Scudetti: 29
Messaggi: 53971
|
Quote:
|
|
|
|
|
|
|
#5 | |
|
Senior Member
Iscritto dal: Sep 2001
Città: Vicopisano (PI)
Messaggi: 11652
|
Quote:
__________________
>>PARTECIPA AI PROGETTI DI CALCOLO DISTRIBUITO CON BOINC.Italy!<<
You may say I'm a dreamer - But I'm not the only one - I hope someday you'll join us - And the team will be the 1# one BoincEmperor 1° Livello - Rotoloni DOCET!! Cactus rulez!! ![]() |
|
|
|
|
|
|
#6 |
|
Senior Member
Iscritto dal: Sep 2001
Città: Vicopisano (PI)
Messaggi: 11652
|
Su altervista è tutto bloccato
__________________
>>PARTECIPA AI PROGETTI DI CALCOLO DISTRIBUITO CON BOINC.Italy!<<
You may say I'm a dreamer - But I'm not the only one - I hope someday you'll join us - And the team will be the 1# one BoincEmperor 1° Livello - Rotoloni DOCET!! Cactus rulez!! ![]() |
|
|
|
|
| Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 02:15.














) per esempio sullo spazio di hwu che evvivad m'ha dato non funzionano i socket








