Jump to content
php.lv forumi

Ja atrod portu, nevar uzpiezt pogu.

Janka no Benzin Tanka

Recommended Posts


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:



$site = "php.net";

$port = 80;


$fp = fsockopen($site,$port,$errno,$errstr,10);



echo "Cannot connect to server";




echo "Connect was successful - no errors on Port ".$port." at ".$site;






Pogas piemērs:

<form action="processing.php" method="post">

< input type="submit" name"submit" value="Poga" >




Tagad viņus vajag savienot, lai nevarētu pogu uzpiest, ja ports ir atvērts. Bet ja neatrod portu, tad pogu var uzpiest.

Edited by Janka no Benzin Tanka
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...