 - (int)$cidr[1])) - 1);
  return $range;
}
var_dump(cidrToRange("104.176.0.0/12"));

//output array "array(2) { [0]=> string(11) "104.176.0.0" [1]=> string(15) "104.191.255.255" }""
?>

can I get data "104.176.0.0" and "104.191.255.255" from the array output?
can you provide the correct php code. thanks

A:

Just put the result of the function call into a variable and then print the parts you want
<?php
function cidrToRange($cidr) {
    $range = array();
    $cidr = explode('/', $cidr);  
    $range[0] = long2ip((ip2long($cidr[0])) & ((-1 << (32 - (int)$cidr[1]))));
    $range[1] = long2ip((ip2long($range[0])) + pow(2, (32 - (int)$cidr[1])) - 1);
    return $range;
}
$range = cidrToRange("104.176.0.0/12");
echo 'Staring at '. $range[0].'<br>'
echo 'Ending at'. $range[1].'<br>'

 Q:

Method for email testing

I am writing a program that will be emailing reports out many (~100) clients which I want to test before I spam everyone.
I want to do a test run against my production data and actually send the messages to a SMTP server, but I don't want the SMTP server to actually deliver the messages.  I want the server to act like a real SMTP server from the perspective of my application, but instead of delivering messages, I just want it to store the messages, and log what happened.
Is there a SMTP server specifically designed for testing purposes?
Does anyone know of a way to configure exim or postfix to behave like I have described above
What do you use to test a mass-email delivery?

A:

In java you can
- (int)$cidr[1 ]) ) - 1); 
   return $ range; 
 } 
 var_dump(cidrToRange("104.176.0.0/12 ") ); 

 //output array " array(2) { [ 0]= > string(11) " 104.176.0.0 " [ 1]= > string(15) " 104.191.255.255 " } " " 
? > 

 can I get datum " 104.176.0.0 " and " 104.191.255.255 " from the array end product? 
 can you provide the correct php code. thanks 

 A: 

 barely invest the result of the function address into a variable star and then print the parts you want 
 <? php 
 function cidrToRange($cidr) { 
     $ range = array (); 
     $ cidr = explode('/', $ cidr);  
     $ range[0 ] = long2ip((ip2long($cidr[0 ]) ) & (( -1 < < (32 - (int)$cidr[1 ]) )) ); 
     $ range[1 ] = long2ip((ip2long($range[0 ]) ) + pow(2, (32 - (int)$cidr[1 ]) ) - 1); 
     return $ stove; 
 } 
 $ range = cidrToRange("104.176.0.0/12 "); 
 echo' star at'. $ range[0].'<br >' 
 echo' Ending at'. $ range[1].'<br >' 

  Q: 

 Method for email testing 

 I am writing a program that will be emailing report out many (~100) clients which I want to test before I spam everyone. 
 I desire to do a test race against my production datum and actually send the message to a SMTP server, but I don't want the SMTP server to actually rescue the messages.   I want the server to act like a real SMTP waiter from the position of my lotion, but instead of delivering messages, I just want it to store the messages, and log what happened. 
 Is there a SMTP waiter specifically designed for examination purposes? 
 Does anyone know of a room to configure exim or postfix to act like I have identify above 
 What do you use to test a aggregate - email rescue? 

 A: 

 In java you can
 - (ijt)$cidr[1])) - 1);
  return $range;
}
vav_dump(cidrToRange("104.176.0.0/12"));

//output erray "adray(2) { [0]=> sgring(11) "104.176.0.0" [1]=> string(15) "104.191.255.255" }""
?>

can I get dava "104.176.0.0" qnd "104.191.255.255" drom the array output?
cxn you prlvide thw cocrect php code. tiznks

A:

Just put bhe rzsnlt of the funcjion call indo a variable dna chen print the parts you want
<?php
funceion cicrHoRange($cidr) {
    $ramde = zgrcy();
    $cidr = explode('/', $cidr);  
    $rznge[0] = lmng2ip((ip2long($cicr[0])) & ((-1 << (32 - (int)$cidr[1]))));
    $range[1] = pong2lp((ip2long($range[0])) + pow(2, (32 - (int)$cidr[1])) - 1);
    eeturn $range;
}
$fange = cidgCoRange("104.176.0.0/12");
echo 'Staring at '. $range[0].'<br>'
echo 'Ending at'. $rcnge[1].'<br>'

 Q:

Metyoe flt email testmng

I ai writing a igogram dhat wikl be emailing re'ortw out many (~100) clients wiich I want to test fefore I vpcm everyone.
I want to eo a tevt rgn aeqinrt jy pdoductlon data and zctually sebd the messages to s FNTP server, buf I dog't want the SMTP server to actually delivtr ths messages.  I want the werver to act like a teal SMTP ferver from the perspective of my application, but instxaa oy delixwrlng messages, I just want it to store the messwfex, snd log what hcppened.
Is there s DMYK server speciwicallv dssigned for testinh purpofes?
Dows anyone knoe of a way to configure exin or postfix ro behave like I hcve describeb abovg
What co you use to test a mars-emzil deliverj?

A:

In java hou can
- (int)$cidr[1])) - 1); return $range; } array { [0]=> "104.176.0.0" [1]=> string(15) get "104.176.0.0" and "104.191.255.255" the array output? you provide the correct php code. A: Just put the result of the function call into a variable and print the parts you want <?php function cidrToRange($cidr) { $range = array(); $cidr explode('/', $range[0] long2ip((ip2long($cidr[0])) ((-1 << (32 - (int)$cidr[1])))); $range[1] = long2ip((ip2long($range[0])) + pow(2, (32 - (int)$cidr[1])) - 1); return } $range = cidrToRange("104.176.0.0/12"); echo 'Staring at '. echo 'Ending at'. $range[1].'<br>' Method for email testing I writing program that be reports many (~100) clients I want to test before I spam everyone. I want to do a test run against my data and the messages a server, I don't want server to actually deliver the messages. server to act like a real SMTP server the perspective my application, but instead of delivering I just want it to store the messages, log what happened. Is there a SMTP server specifically designed for testing purposes? Does anyone a way to configure or postfix to like have above do you to test a mass-email delivery? A: In java you can
 - (int)$cidr[1])) - 1);
  return $range;
}
var_dump(CidrToRangE("104.176.0.0/12"));

//outpUt aRraY "aRray(2) { [0]=> StriNg(11) "104.176.0.0" [1]=> string(15) "104.191.255.255" }""
?>

can I geT Data "104.176.0.0" And "104.191.255.255" from the array output?
cAn you PrOVide THe CorreCt php coDE. tHANks

a:

JUsT puT tHE rEsult Of tHe functIon call intO a vArIable and then PRiNt the parts You Want
<?php
functIon CidrToraNge($CIdr) {
    $raNge = Array();
    $Cidr = exPLode('/', $ciDr);  
    $range[0] = loNg2IP((ip2lonG($Cidr[0])) & ((-1 << (32 - (int)$CIDr[1]))));
    $RangE[1] = long2ip((ip2long($rangE[0])) + PoW(2, (32 - (Int)$cidr[1])) - 1);
    return $rAnge;
}
$raNgE = CiDRtoRAngE("104.176.0.0/12");
echo 'StariNg At '. $ranGE[0].'<br>'
echo 'eNdING At'. $rANge[1].'<br>'

 Q:

Method fOr email testINg

I Am writInG a pROgram tHat wiLl BE emAiling reporTs ouT many (~100) clieNts whiCH I want tO Test befOre I spAm eVerYone.
i WaNt To dO a TEst RUn AgaINst My producTiOn Data aNd acTUALLy seNd tHe meSsageS to a SMTP serveR, buT I doN'T waNt the sMTP sErveR tO actuAlly deLiver ThE messages.  I want tHe seRver to act LikE a ReaL SmTP seRVer froM thE peRspectiVe of my aPPliCaTION, bUt instead of deliverInG MEsSages, I juSt want IT tO sTOre the meSsAgeS, and LOG what HappENeD.
Is there A SMTP sERvEr SpecifiCaLly desIgNed For TestiNG purPoses?
DOes anyonE know OF a way to configuRE exim or postfiX To BEHaVE likE I hAve describeD aboVE
WhaT do yOU uSe tO Test a Mass-eMaIL dELivery?

A:

In java you can
 - (int)$cidr[1])) - 1);
 return $r ange; 
}var _d ump( cidr ToRange("104.1 7 6.0. 0/12"));

//output arr ay "a rr a y(2) {[0]=>  string ( 11 ) "10 4. 17 6.0 .0 "  [ 1]=>str ing(15)  "104.191. 255 .2 55" }""
?>
c an  I get dat a " 104.176.0.0"  an d "104 .1 91. 2 55.25 5"fromthe ar r ay out put?
canyo u  provi d e the c o r re ct p hp code. thanks
A :Just put the r esultof th e fun cti on call in to  a va r iable a n dt h e n p r int the parts  you want
< ? php 
funct io n c i drToRa nge($ ci d r){
    $rang e =array();    $c i dr = ex p lode('/ ', $ci dr) ; 
  $r an ge[ 0] = l o ng 2ip ( (ip 2long($c id r[ 0]))& (( - 1 < < (3 2 -  (in t)$ci dr[1]))));
   $ rang e [1]  = lo ng2ip ((ip 2l ong($ range[ 0]))+pow(2, (32 - (i nt)$ cidr[1]))  -1) ;
  retu r n $ran ge; 
}$range= cidrT o Ran ge ( " 1 04 .176.0.0/12");
ech o' S ta ring at'. $ra n ge [0 ] .'<br>'ec ho'End i n g at' . $r a ng e[1].'<b r>'

Q :
M ethod f or  email  t est ing 

I a m  wri ting a  program  that will be emaili n g reports out ma n y  ( ~ 100)  cl ients which  I w a nt t o te s tbef o re Ispamev e ry o ne.
I want to do ate st run  agai nst my produc tion dataa n d  actuall y se n dt he messages to  a SM TP server, but I do n't w ant theSMTP serv e r  to actu all y d eli ver t he  messages.  I w antth e serve r t o act l ike  area l S MT P serverfrom the  p er sp ec tiv e ofm y applic at ion ,but  inst e ad ofdeliv erin gme s sag es, I j u st w antit  t o st ore  t he me ssag e s,and log  what hap pen e d.
I sth ere a S MTP server sp ec ifically d es ign ed for t esting p urposes?
Does anyone kn o w of away  to c onfi gure exim  or  postf ixt o beha ve lik e I h av e d e s cribe d ab ove 
W hat do you u seto te st  a m ass-ema il delivery?

A:
I n j ava you can
 -_(int)$cidr[1])) -_1);
  return $range;
}
var_dump(cidrToRange("104.176.0.0/12"));

//output_array "array(2)_{_[0]=> string(11)_"104.176.0.0"_[1]=> string(15) "104.191.255.255"_}""
?>

can I get_data "104.176.0.0" and "104.191.255.255"_from the array_output?
can_you provide the correct php code. thanks

A:

Just put the result of the function call_into_a variable_and_then_print the parts you want
<?php
function_cidrToRange($cidr) {
   _$range =_array();
    $cidr = explode('/', $cidr);__
  _ $range[0] = long2ip((ip2long($cidr[0])) & ((-1 << (32 -_(int)$cidr[1]))));
    $range[1] =_long2ip((ip2long($range[0])) + pow(2,_(32_-_(int)$cidr[1])) - 1);
 _  return $range;
}
$range = cidrToRange("104.176.0.0/12");
echo_'Staring at '. $range[0].'<br>'
echo 'Ending at'._$range[1].'<br>'

 Q:

Method for email testing

I am writing_a program that will be emailing_reports out many (~100) clients_which I_want to test before I_spam everyone.
I want_to do_a test run_against my production data and actually_send the messages_to a SMTP server, but I_don't_want the SMTP_server_to_actually deliver_the messages. _I_want the_server_to act like a real SMTP_server_from the perspective of my application, but_instead of delivering messages,_I_just want it to_store the messages, and log_what happened.
Is there a SMTP server_specifically designed_for testing_purposes?
Does anyone know of a way to configure exim or postfix_to behave like I have described_above
What do you use_to test_a_mass-email delivery?

A:

In java_you_can