I have been thinking about this new( I know it has been a while ;p) google's feature that displays the website in the search result.
What i don't kind of get is, how they did it? Is it a form of iframe? or is it a php render of the page? Is it dynamic JavaScript/Ajax? I am just very curious how they have done it? And the follow up question would it possible for us to duplicate for our own sites? Like a search result page to display the page on mouse hover.
Any assistance would be most appreciated? I searched everywhere i could not get a definite answer anywhere?
The thumbnail is rendered by some kind of browser engine, and stored in an image file. There are lots of providers of this service, for example Thumbshots, WebSnapr and ShrinkTheWeb.
It is a thumbnail rendered on server side, and stored in an image file.
There are questions on SO dealing with how to do this, e.g.:
How can I generate a screenshot of a webpage using a server-side script?
How can I take a screenshot of a website with PHP and GD?
How might I obtain a Snapshot or Thumbnail of a web page using PHP?
Related
I'm building a site where there will be four tiles on the front page. When a tile is selected, I want the content to pop up in like a window that will be a bit transparent so you can see the main page behind it.
I've successfully coded just that, getting the link to bring up another div that is otherwise hidden and I've even gotten it to load another html document. I accomplished this with XMLHttpRequest();. My question is, is there a more efficient way to do this? I know I've done something similar in PHP before in school and when I google, I do see that being a way to do it, but I'm also seeing jQuery and AJAX being mentioned. My overall goal is to get it to where if I want to update the CSS of the screens, that I only have to do that for the main page, and it affects the content pop-ups.
I hope I explained this well enough. Thank you for any advice!
It's very simple to do in jQuery:
$("#yourDivsId").load("/UrlOfYourIntendedMarkupDelivery?anyarguments=true");
So for example wikipedia, yahoo answers, or even stack overflow.
I'm trying to create a site that will allow users to create new pages of content to add to my site for other users to view.
I'm reading an introductory book on php/mysql. All i really want to know is will i find what i need in there? Is PHP what i would use to achieve that? Or do i need to use something else?
Also any general suggestions pointing me in the right direction would be greatly appreciated!
Thanks!
Why not just download MediaWiki for your site?
Yes, PHP and MySQL is what you would need, since you are creating dynamic pages. You would use PHP to process the HTML form submits of pages, and use MySQL to store the data. You would then use PHP to list all of the pages that users have made.
I'm trying to create a web based welcome display for a building entrance. The project would include:
1) A wmv movie play constantly on the digital display until some visitors touch the screen (this can be played either locally or on the internet, but it has to be able to go to number 2 when visitors touch the screen)
2) A couple of buttons with department names show up for visitors to choose who they are here to see
3) After the visitor touch on one button, an email is sent to the department
4) Thank you page, the site should go back to the number 1) again
My experience is html, css, php, javascript, and some Flash, but I'm open to learn new skills. Can someone please suggest some good ways to build this site? Is there any tutorials or good sites I can learn from, that would be a bonus.
Thanks very much.
Sam :)
Edit:
Thanks very much Vigrond and Lloyd! You guys' answers are equally helpful, so I'll use html5 and javascript.
I have a couple of further questions, I hope you guys or someone can help me. (Any part of questions' help is appreciated)
Since this is going to be a kiosk, the same movie is going to be played constantly, everytime after the customer has contacted us, the 'thank you' page is going to show briefly and go back to the first movie page. My question is how can I not let the movie load again and again everytime when there is a customer? Because the local data space for the display is going to be limited.
I've been thinking if I just create one page for the whole process and use a javascript slide to make each page as a div, so the movie div is going to be hiden so it doesn't need to be reloaded again, would that fix number 1) data space concern?
I'm thinking of using a horizontal slide like http://www.queness.com/post/356/create-a-vertical-horizontal-and-diagonal-sliding-content-website-with-jquery How can I make the last div (thank you) to show about 5 secs and go to the first div (movie) again?
Thanks very much! :)
This can be purely done using html5/javascript (+php for the email sending). Google Chrome also has a -kiosk mode, that will enable fullscreen.
I would probably use HTML5 video, along with something like the jQuery cycle plugin. On the video onclick handler, I would just cycle() to the next 'slide'. You can put in effects such as fadein, fadeout, slide, etc.
If you wanna get fancy, a mobile framework such as jQuery mobile or Sencha mobile may be right up your ally as well, (with aesthetic familiar interfaces and cool transitions)
beside some backend PHP to send email, this trivial app could be built using plain old HTML5, CSS and Javascript.. I wouldn't bloat it with jQuery or jQuery plug-ins unless necessary..
I don't recommend using WMV content, though - this proprietary format is not supported by any of the main browsers.. To ensure maximum browser support, encode you media using an open format like WebM:
http://www.webmproject.org/
Can someone tell me what happens when i enter a link into the Facebook Status Update Form and it loads up a mini info kinda thing of the website (I'm guessing its RSS or something?)
How do i implement this on my site using PHP?
What do i need to learn to be able to implement that?
It scrapes the page you are linking to. It doesn't have anything to do with RSS.
By looking at the HTML of the page it can get the page title for you and find all the images that can be used as a thumbnail.
Take a look at HTTP or cURL in the PHP manual for methods to get webpage content.
This question may have been asked before, but I couldn't find an answer to it using both Google and the built-in search function of this site.
I want to use jQuery on my website, but only if it is displayed on a desktop computer. If my site is displayed on a mobile device, I don't want it to load jQuery.
What's the best way to do this?
Should I use Javascript or PHP for detecting the device type?
http://jsfiddle.net/fk9kC/
The code above is pretty much self-explanatory - by using a DOM element being hidden or shown depending by a screen width you're being able to target mobile phones more or less accurately.
Furthermore, you can also replace the device-width statement with max-device-width.
What about this? Auto detect mobile browser (via user-agent?)
You would need to check the user agent.
You will need to define what is a mobile platform to you.
One hack may be to include a media type mobile stylesheet, and have it set an element to something specific that you could check for using JavaScript. This is hacky though, but it will mean you won't need to parse user agents.