<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2011 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
trigger_error('malformed URL given', E_USER_NOTICE);
return false;
}
- $data = file_get_contents($url);
+ if (file_exists($url)) {
+ $data = file_get_contents($url);
+ } else {
+ return false;
+ }
if (!$data) {
return false;
}
return null;
}
}
-// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker fenc=utf-8:
?>