Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once 'stdlib.php';
- $file = '/tmp/bommed.out';
- function boms_away($file = '/tmp/bommed.out')
- {
- $fp = fopen($file, "w");
- fwrite($fp, pack("CCC", 0xef, 0xbb, 0xbf));
- fclose($fp);
- }
- boms_away($file);
- $fh = fopen($file, 'r');
- $data = fread($fh, filesize($file));
- fclose($fh);
- $m = new Mongo("mongodb://localhost:27017");
- $db = $m->test;
- $coll = $db->test;
- $coll->insert($data);
- ?>
Add Comment
Please, Sign In to add comment