dcsimg
www.webdeveloper.com
Results 1 to 12 of 12

Thread: get web screen shot from URL

  1. #1
    Join Date
    Nov 2014
    Posts
    7

    get web screen shot from URL

    I want to create a web service in which i enter a URl and it displays the screenshot of the Website (URL) on the page without opening it.
    I'm only allowed to use PHP, html and css moreover i'm not allowed to use third party api's.
    I Googled the problem and got a website doing exactly the same i want --> https://www.url2png.com/

    I don't want you guys to to my homework instead i want you to give me a startup about how can i do it and where should i start?

    I'll be greatfull to you

  2. #2
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,928
    I can't think of any way with those limitations, as the tricky part will be rendering the content into an image -- you would essentially have to create your own web browser.
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  3. #3
    Join Date
    Nov 2014
    Posts
    7
    What to do then please guide?

  4. #4
    Join Date
    Jul 2013
    Location
    Voorheesville NY USA
    Posts
    1,019
    Sounds like a pretty tricky problem - one that your instructor is probably expecting YOU to solve. It probably involves material from whatever lessons you have recently had.

    Good luck!

  5. #5
    Join Date
    Nov 2014
    Posts
    7
    We just learnt basic PHP and he gave us this assignment. He also challenged us if any one completed this task he'll give him full marks in whole course.

    So please do help me saving my semester

  6. #6
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,928
    Maybe something like this: http://wkhtmltopdf.org/ ?
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  7. #7
    Join Date
    Jul 2013
    Location
    Voorheesville NY USA
    Posts
    1,019
    You are learning 'basic php' and he asked you to do this? I don't believe it.

    But as nogdog suggested, pdf does sound like the way to go. I was kind of hoping YOU would think of it first.

  8. #8
    Join Date
    Nov 2014
    Posts
    7
    Bro i've read some where that i might need an HTML interpreter that can interprate code as Image. Are there any ?

  9. #9
    Join Date
    Nov 2014
    Posts
    7
    I'm going for it (PDF). My instructor told me not to use any third party api's thats why i'm confused about it. Other wise its a quick solution t the problem i guess.

  10. #10
    Join Date
    Nov 2014
    Posts
    7
    I've installed wkhtmltopdf. I have to create a web service in which one submits a url and we get its image how can this lib help me there because what i've seen so far is that it generates pdf by using command line

  11. #11
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,928
    Usually "API" in this context would mean making an HTTP request to some URL (via it's web API) that returns a response in a totally "black box" manner, whereas in this case you would be installing software on your web server and interacting with it via your server-side software -- of course, that would technically be via its command line (or other) API, but maybe that's okay?
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  12. #12
    Join Date
    Nov 2014
    Posts
    7
    I've downloaded and using PhantomJS for the purpose of ScreenShots of URL and its working fine with command prompt (extracting image of web from url) now how can i install it on server to test it with the web (html etc). I'm using xampp server (Apache) how can i install it there and what to do if i have to make it online?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles