Janka no Benzin Tanka Posted January 18, 2010 Report 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
2easy Posted January 18, 2010 Report Posted January 18, 2010 kā sauc tavu latviešu valodas skolotāju? Quote
Janka no Benzin Tanka Posted January 18, 2010 Author Report 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
Pentiums Posted January 18, 2010 Report Posted January 18, 2010 visu mūžu esmu audzis benzīn tankā. ha ha :)) Quote
Janka no Benzin Tanka Posted January 18, 2010 Author Report Posted January 18, 2010 Davai pa tēmu... Quote
Kavacky Posted January 18, 2010 Report Posted January 18, 2010 if (!$fp) { echo '<poga>'; } else { // nekā } Quote
Janka no Benzin Tanka Posted January 18, 2010 Author Report 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
Janka no Benzin Tanka Posted January 18, 2010 Author Report Posted January 18, 2010 Vairs nevajag , atradu! Quote
Val Posted January 18, 2010 Report Posted January 18, 2010 http://php.net/manual/en/function.fsockopen.php - timeout parametrs. Quote
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.