BRADERY Posted October 24, 2010 Share Posted October 24, 2010 Ok I have this code.. it logs into my myspace accounts and grabs some info.. it is supposed to log into each account and write the info to a file.. what it does is logs into the first account and writes the info to the file then when it signs into the second account it doesnt write the info on the new line it just overwrites the info from the previous account.. here is some of the code for($i=0; $i!=count($account_data); $i++){ echo "\n::: ".strtoupper($account_data[$i][0])." :::\n"; if($account_data[$i][1] != "" && stristr($account_data[$i][0], "@") && stristr($account_data[$i][0], ".")){ list($place[0],$place[1],$place[2],$place[3]) = authorize($account_data[$i], $game_link); if($place[2] > 1 && strlen($place[3]) == 40){ $filename = 'auth-keys.txt'; $fp = file($filename,'a+'); $data = $place[2]." ".$place[3]."\r\n"; file_put_contents($filename, $data); echo $data;}}} sleep(10000); heres a pic Any help would be greatly appreciated Link to comment https://forums.phpfreaks.com/topic/216730-what-am-i-doing-wrong/ Share on other sites More sharing options...
Pikachu2000 Posted October 24, 2010 Share Posted October 24, 2010 Did you read the manual for file_put_contents()? If filename does not exist, the file is created. Otherwise, the existing file is overwritten, unless the FILE_APPEND flag is set. Link to comment https://forums.phpfreaks.com/topic/216730-what-am-i-doing-wrong/#findComment-1125962 Share on other sites More sharing options...
BRADERY Posted October 24, 2010 Author Share Posted October 24, 2010 tHANKS! Link to comment https://forums.phpfreaks.com/topic/216730-what-am-i-doing-wrong/#findComment-1125964 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.