Balthazar Posted May 20, 2011 Report Share Posted May 20, 2011 <?php $brush_price = 255; for ( $counter = 1; $counter <= 255; $counter += 1) { echo "add address=192.168.1.$counter mac-address=00:00:00:00:00:00 interface=ether1<br>"; } // ?> Елементарен е но на мен поне ми върши добра работа Link to comment Share on other sites More sharing options...
MiPSus Posted May 20, 2011 Report Share Posted May 20, 2011 вместо $counter += 1 $counter++ ... и яз можем, и тате може, ма козата си сака пръч! Link to comment Share on other sites More sharing options...
Balthazar Posted May 20, 2011 Author Report Share Posted May 20, 2011 Дам и така става Link to comment Share on other sites More sharing options...
MiPSus Posted May 22, 2011 Report Share Posted May 22, 2011 Дам и така става Колега надявам се не си го приел лично , все едно те поучавам Просто обичам сбит кода като този: <?php $brush_price = 255; for($c=1;$c<256;$c++) { print 'add address=192.168.1.'.$c.' mac-address=00:00:00:00:00:00 interface=ether1<br>'; } ?> А ако ползваш директно сорса ще трябва да е print 'add address=192.168.1.'.$c.' mac-address=00:00:00:00:00:00 interface=ether1'."\n"; ... и яз можем, и тате може, ма козата си сака пръч! Link to comment Share on other sites More sharing options...
Balthazar Posted May 22, 2011 Author Report Share Posted May 22, 2011 Е не няма за какво да се обиждам за този вариант изобщо не се бях сещал Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now