Showing posts with label cool website. Show all posts
Showing posts with label cool website. Show all posts
Thursday, February 23, 2012
Saturday, November 5, 2011
Zomato.com
Zomato.com is a new buzz on internet for foodies. They provide lists of restaurant through many filters like your location, by cuisine, by name(of course). Over it there are many more filters so you can choose the restaurant of your choice. They currently provide service in 10 major cities of India. You can download app for android, iphone, blackberry and nokia/symbian or you can visit at m.zomato.com on mobiles.
For website developers they have a search widget which can be embedded in site. Customize size of the widget according to the need of site and embed it using the script they provide.
For website developers they have a search widget which can be embedded in site. Customize size of the widget according to the need of site and embed it using the script they provide.
From a point of view of web developer, content placement on the site is very good and the color combination of shades of dark red and shades of grey is also great. That is why the site looks cleaner.
Zomato has released their API publicly. Here we will talk about the API of zomato, not all but one of them. The API is very easy to use.
Requires:
Zomato API key, PHP, JSON
Using:
Let the key be 'api'. Now we would like to have names of cities where they provide service.
- <?php
- $cities = json_decode(get_file_contents("https://api.zomato.com/v1/cities.json?apikey=api"));
- echo $cities->city[0]->city->name;
- ?>
Explanation:
3. 'apikey' is must in the url because it has to be parsed to get the JSON. The 'api' is to be replaced with
you api key given by zomato. Function json_decode() will turn that JSON in a stdClass object.
4. Data can be fetched from the object like the syntax in this line. Its similar to calling object variables or
methods as done in class objects.
3. 'apikey' is must in the url because it has to be parsed to get the JSON. The 'api' is to be replaced with
you api key given by zomato. Function json_decode() will turn that JSON in a stdClass object.
4. Data can be fetched from the object like the syntax in this line. Its similar to calling object variables or
methods as done in class objects.
Note: SSL has to be enabled on your server, because look at the url it has 'https' which is secured.
Respect the privacy of the users and read zomato policies before taking the application
online.
Respect the privacy of the users and read zomato policies before taking the application
online.
So, go to zomato build your own application about restaurants, their menus and much more. This is a great site to find place where you will like to eat what you want to eat.
Labels:
cool website,
json,
json decode php,
json php,
php,
zomato,
zomato api,
zomato.com
Friday, October 7, 2011
Cool front page
There is a site on internet We Are Empire. This site has pretty cool front page. Page is pretty descriptive too plus it don't irritate the user by reloading for new content. Some other site like this which I personally liked is Nike's nike better world site. It takes a little while to load but every information is on just single page and designed in awesome way using HTML5, z-index and many more things. We will come to it some other time.
But we will talk about the former one here. After running a console over the site, I understood what they had done. Well its nothing but Javascript and applaud to the maker, it is used very well for designing. It do not have flash.
But we will talk about the former one here. After running a console over the site, I understood what they had done. Well its nothing but Javascript and applaud to the maker, it is used very well for designing. It do not have flash.
- What they had done is when you click on the front logo which is image it shows you next div which is hidden behind it and hide the top div.
- Now you see 4 bubbles. Thats interesting now margin of the image in background of the bubble changes when you hover it while hiding the overflow. This is a good thing, must have taken long time to do that.
- Open at the bottom is the coolest thing. Click on it and another page comes with no page loading. Again is the game of margin. Margin-top is changed using Javascript to animate.
- There are smaller effects also like close appearing and hiding, get in touch etc.
So, this is how this front page is working. Try making yours with such innovation.
Here is a example of that a very short one.
- <script type="text/javascript">
- function anim(mydiv)
- {
- var i = 0;
- while(i < 10)
- {
- mydiv.style.marginTop = 10*i + 'px';
- i++;
- }
- }
- </script>
- <div id="mydiv" onclick="javascript:anim(this)">
- test
- </div>
Subscribe to:
Posts (Atom)