Member Avatar for champmanking


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:


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


    // 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.


Member Avatar for 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..

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.