[ create a new paste ] login | about

Link: http://codepad.org/Wupe59tq    [ raw code | output | fork ]

proch - PHP, pasted on Jul 16:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<?
// Get file modification date
$filename = 'somefile.txt';
if (file_exists($filename)) {
    echo "$filename was last modified: " . date ("F d Y H:i:s.", filemtime($filename));
}

// Retrieve page
$url='http://4ngs.com/bubu.html';
$content = file_get_contents($url);
$jsonData = json_decode(file_get_contents($url));

echo "<h3>END</h3><p>$content</p>\n";
?>


Output:
1
2
3
4
5

Warning: file_get_contents(http://4ngs.com/bubu.html): failed to open stream: No such file or directory on line 10

Warning: file_get_contents(http://4ngs.com/bubu.html): failed to open stream: No such file or directory on line 11
<h3>END</h3><p></p>


Create a new paste based on this one


Comments: