Hey.

I need help coding a php script that receives a URL from a form then displays all the images(jpeg, png and gif) from that webpage. I don't need to images to be saved.
This is what I already have:

form.html

<html>
    <head>
    </head>
    <body>
        <div id="form"> 
            <form action="view.php" method="get">
                <input type="text" name="url">
                <input type="submit" value="View Images">    
            </form>
         </div>  
    </body>
</html>

view.php

<?php
    // get url from form
    $url = $_GET["url"];

    // get contents from url
    $content = file_get_contents($url);

    // finally display images
    echo $images;
?>

How do I go about coding the rest? What functions do you suggest? Any pseudocode or actual code would be helpful.
Don't worry about checking for errors or adding security measures as it's for personal use on localhost.

Thanks.

Member Avatar
diafol

If you have found a solution, perhaps you could paste it here?

now a time i have no display code but in future when i will be got i must share it here..