php - Can I parse the directory listing of an external webpage? -


is possible parse directory listing of webpage external given webpage accessible , shows list of files when access it. want know possible parse files dynamically in php , how? -thank you

sorry being not clear. mean directory listing such as: http://www.ibiblio.org/pub/ (index of /..) , ability read content array or easy manipulate in script

you can use preg_match or domdocument

for case:

$contents = file_get_contents("http://www.ibiblio.org/pub/"); preg_match_all("|href=[\"'](.*?)[\"']|", $contents, $hrefs); var_dump($hrefs); 

if want take @ working demo.


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -