Filghts Search Engine - search-engine

I would like to integrate in my web site a flights search engine. I am wondering how can i do this. Who sells this kind of service? or there is an elegant and easy way to this?
ps: of course i need the possibility to books the flights.

FlightStats has an API that may serve your purposes, depending on your use case.
(If you want to do bookings and such it won't help you there, but it will show you flights for the next several days, as well as data for flights in the air).
If you need information for bookings, you're pretty much stuck going to Sabre.

Related

Rails app for food truck, using twitter to update the google map.

So I am writing a rails application for my friends food truck business.
The functionality that I am trying to create with this specific application is the ability for him to update the google map by posting a Geo-location tag on twitter.
A lot of the ruby gems that deal with google maps seem to be depreciated so I'm a bit lost at the moment. If anyone could just point me in the correct direction I would appreciate it.
I realize that this feature is just a quality of life feature but id like to be able to do it with embedded ruby and not have to break out the JavaScript (ugh). Ideal this kind of automation would be great for this particular type of website because my friend won't always have access to the back-end of the website when he is on the move. (Already able to update a map from an admin backend but its not good enough for a business that moves multiple places in a given day.)
anyways, thanks in advance. (if anyone wants me to post any of my code I will.)
So after reading your question, I thought it would be fun to tinker with the Twitter API again since I haven't used it in a while.
I went ahead and created a sample application for you that basically does what you were asking for. It looks for recent tweets from a user, grabs the latest one, then updates a Google map with a marker on that location.
Keep in mind that this was quickly thrown together, so it's far from perfect. But all the concepts should be there!
Feel free to reach out if you have any questions about the app or anything else. I'm always happy to help.

Adding special offers to website

I am new to web development. Currently I am designing a website where people can purchase different stuff. The website has got a number of special offers such as if you shop for more than $200, you get 20% off, if you shop for 3 similar items, you get a fourth one free.
Can anybody just point me in the right direction what is the best way to do this? Also if the offer changes, I donot have to change a lot of code.
thanks!
You can use various e-commerce and payment gems like the ones in Railscasts.
Some more gems for this purpose are here - The Ruby Toolbox and here too.
As mentioned in the comments, you can use the Saas products like Shopify but that's not free.
I'll point you to some code that should help you out.
For example, " if you shop for 3 similar items, you get a fourth one free. " in ror_ecommerce this is a "Deal". The code is here:
https://github.com/drhenner/ror_ecommerce/blob/master/app/models/deal.rb
This code is not straight forward but basically looks for the best deal an order qualifies for.
if you have buy 2 get one free you might want to implement buy 4 get 2 free and buy 6 get 3 free...
Similiarly ror-e has sales. The only thing you would need to add is a condition for order.total and pass that value into the Sale.for method.
I hope this helpss
DISCLAIMER: I wrote the code!

Search product websites without api

Sorry for the bad title and description, but I was wondering if there is anyway I could search/list products from other sites (say Express, American Eagle), from a web app I create, even if the site doesn't have an API.
Thanks
Sure. How do you think Google and every other search engine does it? They just spider the sites and index the contents. The devil, of course, is in the details. But it's certainly possible to do.
I don't think so. Unless you want only to fetch some data from a certain HTML page, then you need to use some regular expressions. But searching the database is not possible if you don't have the ability to connect to it directly or via some APIs.

Search Engine without crawling?

Is there a way to collect web content in order to use it in a search engine without passing by the web crawling phase? Any alternative to web crawling?
Thanks
No, to collect the content you have to...collect the content. :-)
Yes (and sort-of no).
:)
You can download existing data dumps from various websites (wikipedia, stackoverflow, etc.) and construct a partial index that way. It obviously won't be a complete index of the internet.
You could also use meta-search to construct your search engine. This is where you use the APIs of other search engines and use THEIR search results as the basis of your index. Examples include citosearch and opensearch. duckduckgo uses yahoo's boss api (and now yahoo uses bing...) as part of their search engine.
There are also real-time streaming APIs that you could use instead of crawling the web. Look at datasift as an example. There are lots more resources you could cleverly use and avoid/minimize crawling.
If you want to be updated with the latest content on pages, then you can use something like pubsubhubbub protocol to get push notifications for subscribed links.
Or use paid services like superfeedr that make use of the same protocol.
directly or indirectly you have to crawl the web in order to get the content.
Well if you don't want to crawl, you can follow a wiki-like approach, where users can submit links to sites (with title, description and tags). So a collaborative link collection can be built.
To avoid spam a +/- system can be involved, to vote useful sites or tags up and useless ones down.
To avoid spammers mass voting SERPs you can weight votes by user reputation.
User reputation can be gained by submitting useful sites. Or somehow tracing usage patterns.
And considering other abuse patterns too.
Well, you got the point, I think.
As spammers gradually discover weaknesses of traditional search engines (see Google bomb, content scraper sites, etc.), a community based approach may work. But it would suffer severely from the cold start effect, and when community is small the system is easy to abuse and poison...
At least Wikipedia and Stack Exchange is not spammed to useless levels so far...
PS: http://xkcd.com/810/

ASP.NET Tracking Code & Unique Visitors

I am trying to find a way to track and produce reports for my site (out of interest). Does anyone know of any articles/projects etc that you can
Track pages / unique visitors etc
Tracking 1) relative to timestamp etc
in asp.net mvc or just asp.net ?
P.S - I know google analytics etc is available but looking to create some basic stats for myself out of interest about how web analytics work ?
There are a couple of good ways to try and determine unique visitors, none of them are exact (which is why different analytics will report different numbers).
The first is to use a cookie. Create a cookie for the user for each time frame that you want to track uniques, so you could create one that expires in a day and one that expires in a month. You can then use both of those to track how many unique daily/monthly visitors you have. Of course this is not perfect since people can clear or refuse cookies, but it is pretty accurate.
The other way is to track uniques using a combination of the IP address and User Agent of the requesting user, this is probably slightly less accurate since if a company has a good IT group lots of internal users will have the same User Agent and since they are all coming from the same internal network could have the same IP address.
If you are interested in reading more about the different methods there is a great article about it here: http://www.google.com/support/urchin45/bin/answer.py?answer=28325
I blogged about simple asp.net module.
You can check it here
http://ilkeraksu.com/post/2009/07/14/Very-very-simple-But-very-very-efficient-Aspnet-Tracking-module.aspx
I would recommend using google analytics instead of reinventing the wheel. All you have to do is stick a bit of javascript in your master page and your done.
Yo can check Piwik out. Its an open source web analytics written using PHP and mysql.
you can find great article in http://www.codeproject.com/KB/aspnet/PageTracking.aspx
which is upgraded version of http://www.15seconds.com/Issue/021119.htm
with help of a Session Tracker class that runs in Application_PreRequestHandlerExecute and mailing reports on session end and lot of usefull tips
thanks Wayne Plourde for all that stuff

Resources