Toon posts:

Open remote dir

Pagina: 1
Acties:
  • 32 views sinds 30-01-2008

Verwijderd

Topicstarter
gegroet
volgende probleempje:

ik host ergens een aantal plaatjes, en wil die aanroepen vanuit een php-script op een andere server.

ik doe dus:

code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
//bestandenweergave indexering in een array

<?php
$pwd=getcwd();
$dir=opendir("http://users.pandora.be/birkleech/MZK/Ladies");
$i = 0;
while (false !== ($file = readdir($dir))){
if (!($file=='.' or $file=="..") ){
$dir_array[$i] = $file;
$i++;} }
$aantal=$i;
?>

<html>
dit is den index van http://users.pandora.be/birkleech/MZK/Ladies/<br>
mbhv php
<br>
<br>

<?php
while ($i>0)
{
echo"[img]\"http://users.pandora.be/birkleech/MZK/Ladies/$dir_array[$i]\">";
echo"$dir_array[$i]";
$i--;
}

?[/img]



het resultaat:
code:
1
Warning: readdir(): supplied argument is not a valid Directory resource in /store/web/Test1/index.php on line 7


als ik ipv de url een locale dir neem, werkt het wel.

wat doe ik fout?

heb al gegoogled en daar kwam dan uit dat ik fsockopen ([path],80) moet gebruiken, maar das geen soulaas...

  • drm
  • Registratie: Februari 2001
  • Laatst online: 09-06-2025

drm

f0pc0dert

Music is the pleasure the human mind experiences from counting without being aware that it is counting
~ Gottfried Leibniz


Dit topic is gesloten.