# Remote file

**URL:** <https://www.phphelp.com/t/remote-file/36007>\
**Category:** Beginners - Learning PHP\
**Created:** [February 3, 2024, 5:30pm UTC](https://www.phphelp.com/t/remote-file/36007 "2024-02-03T17:30:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hotspringsrus](https://www.phphelp.com/letter_avatar_proxy/v4/letter/h/d6d6ee/32.png) [@Hotspringsrus](https://www.phphelp.com/u/Hotspringsrus)\
**Post date:** [February 3, 2024, 5:30pm UTC](https://www.phphelp.com/t/remote-file/36007/1 "2024-02-03T17:30:45Z")

</div>

I have content that I moved from a remote server and renamed making a new file date. I want to provide the original creation date of the remote file in a form. I was able to use filectime without issue for local files but don’t know how to access the remote data. I don’t have access to the php.ini file and from reading, this may be my issue. I wouldn’t think I have to fopen a file to get its directory listing data. Am I missing something?

\<?php //test remote date $pdate = "not found"; $fname="https://remote.com/fileIamlookingfor.pdf"; if (file\_exists($new)){ $pdate = date('m-d-y',filectime($fname)); } echo $new . " created: " . $pdate; ?\>

---

<div class="post-metadata">

**Author:** ![Hotspringsrus](https://www.phphelp.com/letter_avatar_proxy/v4/letter/h/d6d6ee/32.png) [@Hotspringsrus](https://www.phphelp.com/u/Hotspringsrus)\
**Post date:** [February 5, 2024, 3:15pm UTC](https://www.phphelp.com/t/remote-file/36007/2 "2024-02-05T15:15:10Z")

</div>

```auto
<?php 
//test remote date 
$pdate = "not found"; $fname="https://remote.com/fileIamlookingfor.pdf";
 if (file_exists($new)){
       $pdate = date('m-d-y',filectime($fname)); 
} 
echo $new . " created: " . $pdate; 
?>

```
