Janka no Benzin Tanka Posted January 18, 2010 Report Share Posted January 18, 2010 (edited) Labdien! Gribēju palūgt vai kāds nevar uzrakstīt skriptu, piemērs: Ja skripts atrod, ka "tāds" ports ir atvērts "tādai" ip, tad nevar saitā uzpiest pogu. Reku piemēram skripts, kurš atrod portu: <?php $site = "php.net"; $port = 80; $fp = fsockopen($site,$port,$errno,$errstr,10); if(!$fp) { echo "Cannot connect to server"; } else{ echo "Connect was successful - no errors on Port ".$port." at ".$site; fclose($fp); } ?> Pogas piemērs: <form action="processing.php" method="post">< input type="submit" name"submit" value="Poga" > </form> Tagad viņus vajag savienot, lai nevarētu pogu uzpiest, ja ports ir atvērts. Bet ja neatrod portu, tad pogu var uzpiest. Edited January 18, 2010 by Janka no Benzin Tanka Quote Link to comment Share on other sites More sharing options...
2easy Posted January 18, 2010 Report Share Posted January 18, 2010 kā sauc tavu latviešu valodas skolotāju? Quote Link to comment Share on other sites More sharing options...
Janka no Benzin Tanka Posted January 18, 2010 Author Report Share Posted January 18, 2010 (edited) Nēsmu mācijies, visu mūžu esmu audzis benzīn tankā. Edited January 18, 2010 by Janka no Benzin Tanka Quote Link to comment Share on other sites More sharing options...
Pentiums Posted January 18, 2010 Report Share Posted January 18, 2010 visu mūžu esmu audzis benzīn tankā. ha ha :)) Quote Link to comment Share on other sites More sharing options...
Janka no Benzin Tanka Posted January 18, 2010 Author Report Share Posted January 18, 2010 Davai pa tēmu... Quote Link to comment Share on other sites More sharing options...
Kavacky Posted January 18, 2010 Report Share Posted January 18, 2010 if (!$fp) { echo '<poga>'; } else { // nekā } Quote Link to comment Share on other sites More sharing options...
Janka no Benzin Tanka Posted January 18, 2010 Author Report Share Posted January 18, 2010 Ir tāda lieta, ja porta nav (izslēgts serviss), tad viņš baigi ilgi lādē to lapu un pēctam to eroru izmet. Kāds bija kods(aizmirsu), lai uzliktu, lai pingo tikai vienu sekundi ? Quote Link to comment Share on other sites More sharing options...
Janka no Benzin Tanka Posted January 18, 2010 Author Report Share Posted January 18, 2010 Vairs nevajag , atradu! Quote Link to comment Share on other sites More sharing options...
Val Posted January 18, 2010 Report Share Posted January 18, 2010 http://php.net/manual/en/function.fsockopen.php - timeout parametrs. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.