Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [PHP]while, Service Temporarily Unavailable
ZaXaZ
post
Post #1





Grupa: Zarejestrowani
Postów: 285
Pomógł: 18
Dołączył: 30.01.2014
Skąd: <?=$_GET['city']?>

Ostrzeżenie: (0%)
-----


Cytat
Service Temporarily Unavailable

The server closed the connection without sending any data.

The server is temporarily unable to service your request due to maintenance downtime or capacity problems.

Due to heavy load on the server, connections may be temporarily blocked from locations that fetch an unusually high number of pages.

We apologize for the inconvenience.


Jestem bardzo słaby w pętlach, gdy próbuje napisać pętle otrzymuje w.w. błąd co ktorąś próbe (a co ktorąś działa poprawnie)

  1. $while = true;
  2. while ($while)
  3. {
  4. /** zapetlenie otwarcie strony (wrazie zmiany wyniku/wariantu
  5.  */
  6. $strona = file_get_contents // (...)
  7.  
  8. while ($while)
  9. {
  10. //sprawdzenie kilku wariantów z zapętlanej strony
  11. if (strpos($strona, 'coś')!==false) /*robimy coś*/
  12. if (strpos($strona, 'coś2')!==false) /*robimy coś2*/
  13. if (strpos($strona, 'coś3')!==false){$while=false; break; }
  14. } if (strpos($strona, 'coś3')!==false){$while=false; break; }
  15. }


Kod skrócony cały bo ma identyczne znaczenie.

Edit: jeśli wyraziłem się nie zrozumiale, proszę pisać.

Ten post edytował ZaXaZ 6.10.2014, 17:34:45


--------------------
Go to the top of the page
+Quote Post
d0m1n1k_
post
Post #2





Grupa: Zarejestrowani
Postów: 208
Pomógł: 3
Dołączył: 13.07.2009
Skąd: Tarnów

Ostrzeżenie: (0%)
-----


"Due to heavy load on the server, connections may be temporarily blocked from locations that fetch an unusually high number of pages."

Dałeś czadu skoro serwer zagroził zablokowaniem dostępu dla Ciebie.

  1. $while = true;
  2. while ($while)
  3. {
  4. /** zapetlenie otwarcie strony (wrazie zmiany wyniku/wariantu
  5.  */
  6. $strona = file_get_contents // (...)
  7.  
  8. //sprawdzenie kilku wariantów z zapętlanej strony
  9. if (strpos($strona, 'coś')!==false) /*robimy coś*/
  10. if (strpos($strona, 'coś2')!==false) /*robimy coś2*/
  11. if (strpos($strona, 'coś3')!==false){$while=false; break; }
  12. }


Może zmniejszenie zapętlenia while w while pomoże.
Proponowałbym jeszcze "znaleźć" warunek dla while'a

Ten post edytował d0m1n1k_ 6.10.2014, 17:40:46


--------------------
Prywatna koncepcja pasji - SprawdzAuto.info
Go to the top of the page
+Quote Post
ZaXaZ
post
Post #3





Grupa: Zarejestrowani
Postów: 285
Pomógł: 18
Dołączył: 30.01.2014
Skąd: <?=$_GET['city']?>

Ostrzeżenie: (0%)
-----


Cytat(d0m1n1k_ @ 6.10.2014, 18:38:59 ) *
"Due to heavy load on the server, connections may be temporarily blocked from locations that fetch an unusually high number of pages."

Dałeś czadu skoro serwer zagroził zablokowaniem dostępu dla Ciebie.

(...)

Może zmniejszenie zapętlenia while w while pomoże.
Proponowałbym jeszcze "znaleźć" warunek dla while'a


Otwieram jedna strone (nie moją) a tam tylko sprawdzam warunki, zaleznie od warunku przechodzi na drugą stronę lub przerywa działanie wink.gif,

dzięki zaraz sprawdzę ale raczej powinno dzialac, az nie dowierzam mojej glupocie bo ta srodkowa pelta kompletnienzbedna byla ... Eh.


--------------------
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 21.08.2025 - 21:00