/    Sign up×
Community /Pin to ProfileBookmark

Hi, can I use opendir and readdir in order to read the file names in a certain directory on a diffrent server ? so the PHP file will be running on a server different than the one the directory is on.

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@pti4kaDec 01.2004 — read here:

http://www.php.net/manual/en/function.opendir.php

taken from above link:

As of PHP 4.3.0 path can also be any URL which supports directory listing, however only the file:// URL wrapper supports this in PHP 4.3. As of PHP 5.0.0, support for the ftp:// URL wrapper is included as well[/quote]
Copy linkTweet thisAlerts:
@SalamauthorDec 02.2004 — Thank you pti4ka for your repply. Actually I read that before I posted my question.

I understand that I can't use "http://....". On the other hand, the PHP installed on the server is 4.3.8 which rules out "ftp://...". That leaves for me "file://..." which I never heared of before. I tried "file://www.xxx.com" but did not work. I ended up not knowing what am I missing
×

Success!

Help @Salam spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.26,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...