Created
February 24, 2018 00:38
-
-
Save nodoid/f60ba8c1b556939b81fe527e7bd274a1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if(isset($_GET['url'])) | |
{ | |
echo "in"; | |
$url = $_GET['url']; | |
echo $url; | |
$images = glob($url."*.{jpg,jpeg,png,gif}", GLOB_BRACE); | |
print_r($images); | |
$arr = ''; | |
foreach($images as $image) | |
{ | |
$arr[] = "$image"; | |
} | |
header('Content-type: application/json'); | |
echo json_encode(array('images'=>$arr)); | |
} | |
else | |
echo "url not set"; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment