BRADERY Posted June 28, 2010 Share Posted June 28, 2010 echo "\n::: ACCOUNTS RETREIVED, BEGIN TOP MOBBING, SENDING ENERGY and REMOVING :::\n"; $iMobLink="http://mob-dynamic-lb".rand(1,5).".mobsters0".rand(1,9).".com/mob/"; for($i=0; $i!=count($iAccountData); $i++) { echo "\n::: ".strtoupper($iAccountData[$i][0])." :::\n"; if($iAccountData[$i][1] != "" && stristr($iAccountData[$i][0], "@") && stristr($iAccountData[$i][0], ".")) { list($iStore[0],$iStore[1],$iStore[2],$iStore[3]) = iAuthorize($iAccountData[$i], $iMobLink); if($iStore[2] > 1 && strlen($iStore[3]) == 40) { $iReward = file_get_contents($iMobLink."top_mob_gift_all?user_id=".$iStore[2]."&auth_key=".$iStore[3]); xml_parse_into_struct($iP=xml_parser_create(), $iReward, $iS, $iX);xml_parser_free($iP); echo "1: ".strip_tags(str_replace("<br>","\n",$iS[$iX['MESSAGE'][0]]['value']))."\n"; } else echo "Account Skipped: wrong password/email combo, or a login error...\n"; } else echo "Account Skipped: invalid email or blank password...\n"; } echo "\n::: PROGRAM FINISHED, YOU CAN CLOSE THIS AT ANY TIME :::"; sleep(10000); how could I make this whole thing repeat if echo reads "You weren't able to".. I just want it to retry this $iReward = file_get_contents($iMobLink."top_mob_gift_all?user_id=".$iStore[2]."&auth_key=".$iStore[3]); xml_parse_into_struct($iP=xml_parser_create(), $iReward, $iS, $iX);xml_parser_free($iP); echo "1: ".strip_tags(str_replace("<br>","\n",$iS[$iX['MESSAGE'][0]]['value']))."\n"; if echo prints "Your weren't able to".. What do I have to add? Link to comment https://forums.phpfreaks.com/topic/206088-repeat-if-echo-prints-something/ Share on other sites More sharing options...
premiso Posted June 28, 2010 Share Posted June 28, 2010 Use Output Buffering (ob_start, ob_get_clean) then do a preg_match or strpos for the string, if that is there then repeat. Link to comment https://forums.phpfreaks.com/topic/206088-repeat-if-echo-prints-something/#findComment-1078331 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.