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

php - How can I edit my code to echo the data of child's element where my search term was found in, in XMLReader? -

jQuery Ajax Render Fragments OR Whole Page -

java - Why is BlockingQueue.take() not releasing the thread? -