Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $ip = $_SERVER['REMOTE_ADDR'];
- $file = 'user_info.php';
- $addresses = array();
- if (file_exists($file)) {
- include($file);
- }
- // example usage
- if (isset($addresses[$ip])) {
- $addresses[$ip]['Status'] = 'Off';
- $addresses[$ip]['Name'] = 'My_Fancy_Name';
- }
- file_put_contents($file, '<'.'?php $addresses = '.var_export($addresses,true));
- ?>
- http://stackoverflow.com/questions/11587675/php-replace-string-in-file
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement