Google Blogoscoped

Forum

Search Ticker  (View post)

Dirson [PersonRank 1]

Tuesday, December 6, 2005
18 years ago

it's cool.

KenWong [PersonRank 3]

18 years ago #

Yes,it is so cool!

Could you please share the source code?

I wanna add one into my own blog.

Thanks.

Philipp Lenssen [PersonRank 10]

18 years ago #

Ken, it's a mixture of private access folders (htaccess), cronjobs, SQL and PHP, so it's not that quick to share or setup. I could host this as service for others but would need a strong separate server to do so. Basically here's how it works:

- Whenever Google is the referrer, I write the referrer string into a MySQL table (which contains just an id int and a referrer varchar)
- Every 10 minutes, a cronjob executes a non-public PHP update script
- The script polls the table, orders the last 40 values by id, explodes the query values, shields against certain queries (like those containing the "-" character, as it could be used to insert messages), and then generates an HTML string out of that
- The HTML string is inserted into a predefined space within an HTML template, which is saved as static file for quick access/ low load
- The HTML template uses a bit of CSS as well as the <marquee> tag, which interestingly enough works in both Firefox and IExplorer
- The final resulting page loads via the Iframe it is embedded in
- The iframe has a client-side meta-refresh which will make sure it refreshes itself every 10 minutes.

If you need details on specific parts of this just let me know.

KenWong [PersonRank 3]

18 years ago #

Thanks so much for all the details,Philipp.

Now i realize how complex it is.I myself know not much about PHP and SQL,so i will note them all for later study.

You've done a really good job.And i've never seen a nice guy like you to share so elaborate information.

Sorry for my crappy english but i just want to say thank you.

John K [PersonRank 2]

18 years ago #

True genius in coming up with a brilliant little use for the marquee tag. I thought it was eliminated from browsers due to UN Resolution 3467, back in 1998.

Philipp Lenssen [PersonRank 10]

18 years ago #

Heheheh. Incidentally, I also tried the blink tag again today... which works in neither Firefox or IE anymore (but I think there's a CSS property to handle it...).

Justin Pfister [PersonRank 10]

18 years ago #

Philipp,
If it's possible to turn the ticker into an easily sharable Javascript or <iframe> that can be put on peoples websites.. Potentially it could help people with SEO in a small way. You could then offer this as a free service and ultimately figure out a way to have it function so that it helps you as well. It may benefit you to use the Google API to make a search results landing page for people that click on the ticker. On the landing page, you could have adsense.

Philipp Lenssen [PersonRank 10]

18 years ago #

Justin, I've played this through because I realized peple may like it. Yes technically it's possible, people would just include a JavaScript in their page. But to handle the traffic, I would a need strong separate server for that. Just now my server was gone (I get a new one soon so that may help with the blog).

Justin Pfister [PersonRank 10]

18 years ago #

Is it a bandwidth issue or an issue with to many concurrent connections?

Philipp Lenssen [PersonRank 10]

18 years ago #

No bandwidth issue. I believe it's many concurrent PHP/MySQL connections...
I'll see if my new server will handle it better. There's gonna be an outage of 1-3 hours or so until the move is done, and I expect it to happen this or next week.
Just had to give http://www.findforward.com a "break."

Don [PersonRank 0]

18 years ago #

Philipp, you are no longer allowed to tease us mere mortals with such cool things unless they can easily be pasted into other people's sites, blogs, and whatnot by a blindfolded monkey.

I think we're going to have to shut down this whole interweb thing before you tech people take over the world.

Justin Pfister [PersonRank 10]

18 years ago #

With the GNewsFeed, my problem was to many concurrent users server intense processes.. That's why I like when you talk about Cronjobs with the FortyFaces.com.. I couldn't do pre-fetched requests for the Gnewsfeed unless I could predict what people were going to be searching for.. same for FindForward.com I think??. You'd have a slightly simular problem with the Search Ticker but I think you could figure something efficient.

Philipp Lenssen [PersonRank 10]

18 years ago #

Witth the search ticker I fill the database but only when Google is the referrer, so that's not much. And then I generate it every N minutes 'cause these days I'm trying to avoid unecessary database action... but to give this thing to others, that would be a lot of traffic, potentially. Similar to the FindForward button I once create which would email people about new links (=referrers) to their site, and which I then had to shut down unfortunately...
And you're right, caching isn't of that much use when it comes to search engine results....

Niraj Sanghvi [PersonRank 10]

18 years ago #

That's a very cool idea. I've been looking for how to represent what searches have led people to my site. I think I might implement it a little differently in that I would show the most popular searches leading to the site from a window of the past 30 days or so.

Philipp Lenssen [PersonRank 10]

18 years ago #

Looking at the ticker, I wonder with so many search things which end up on sites unintentionally – say, I mention "George Harrison" and "Beating around the bush" and suddenly I'm top for "George Bush" (that was a bad example, but very similar things happen) – if it would be feasible for Google to allow people to set a "self correcting" meta format to include in HTML pages. This way webmasters could exclude certain searches and in doing so would get "karma" points whenever someone who otherwise would have stumbled on your page then doesn't. It would make Google results into a bit of a good-will Wiki but since it's exclusion-only it wouldn't be abused. As an incentive, webmasters could use their Karma points to... I don't know, let other pages of them rank higher or something :)

Justin Pfister [PersonRank 10]

18 years ago #

A Google Analytics API would be fantastic at helping your really connect with the people that use it.

GreenWood [PersonRank 0]

18 years ago #

see code html http://blogoscoped.com/ticker/

alek [PersonRank 10]

18 years ago #

Nice work Philipp ... how cool would it be if Google had something like this at their site showing the inbound search requests!

Philipp Lenssen [PersonRank 10]

18 years ago #

Nathan explains how to do it in WordPress:
http://google.blognewschannel.com/index.php/archives/2005/12/06/top-search-referrers/

Brian M. [PersonRank 10]

18 years ago #

> I also tried the blink tag again today... which works in neither Firefox or IE anymore

Philipp, the blink tag works fine. I know because one of my professors uses it for the webpage of a course I just finished. Scroll down..hard to miss. http://www.cs.colorado.edu/~mozer/courses/3702/

Philipp Lenssen [PersonRank 10]

18 years ago #

Very strange, it works in Firefox but not in Internet Explorer for me. I suppose I only checked IE and blindly assumed it doesn't work in Firefox anyway! :)

Forum home

Advertisement

 
Blog  |  Forum     more >> Archive | Feed | Google's blogs | About
Advertisement

 

This site unofficially covers Google™ and more with some rights reserved. Join our forum!