0

I'm having some problems with the two functions filemtime() and file_get_contents

I have this variable

$dataFileName = 'http://www.dota2u.com/newd2u/longpoll/data.php';

and this

$modifiedAt = filemtime( $dataFileName );

The weird thing is than I can't get the filemtime() now, but if I do this:

$dataFileName = 'data.php';

it works... the problem is that I need the full path. Is there a solution?

LSerni
  • 55,617
  • 10
  • 65
  • 107
  • 4
    File operations like filemtime do not work with stream wrappers, you must use local paths. – Sammitch Feb 26 '14 at 21:43
  • possible duplicate of [Get the last modified date of a remote file](http://stackoverflow.com/questions/845220/get-the-last-modified-date-of-a-remote-file) – scrowler Feb 26 '14 at 22:29

0 Answers0