Blogs
MySarkariNuakri - First Android App from VinayRas
Submitted by vinayras on Wed, 12/11/2013 - 13:12VinayRas is proud to announce their first Android application -"MySarkariNaukri"
MySarkariNaukri is an application that displays government jobs from http://www.mysarkarinaukri.com/. Mysarkarinaukri.com is one of the most visited website for government jobs in India.
The syncs jobs from website, and stores locally. This in return offer search facility.
In the second version we will be coming up with more features.
- vinayras's blog
- Read more
- 6074 reads
Delete Orphaned terms from vocabulary (Drupal)
Submitted by vinayras on Tue, 04/02/2013 - 18:59We have been managing several websites powered by Drupal. Over the years we have found that we have several terms that do not have any nodes associated with them, thus rendering empty pages for those keyword.
Here is a small piece code to delete those terms. This can be added to cron to make sure terms are cleaned regularly.
$vid = 3; // Vocabulary ID
$terms = taxonomy_get_children($tid = 0, $vid);
foreach ($terms as $term) {
if (taxonomy_term_count_nodes($term->tid) == 0) {
// See if any nodes use the terms. If none, delete the terms.
- vinayras's blog
- Read more
- 17555 reads
Geolocation information from Browsers
Submitted by vinayras on Tue, 01/08/2013 - 09:38HTML 5 has introduced a new feature - Browser Geolocation API. Now using a simple java-script code, you can extract the location information of visitors. This helps specially if you are providing location based information such as movie details, business listing, travel advisories and other such information.
if (navigator.geolocation) { // check if browse supports
navigator.geolocation.getCurrentPosition(function(position) {
var latitude = position.coords.latitude;
var longitude = position.coords.longitude;
- vinayras's blog
- Read more
- 6739 reads
How to list all cron entries on a WHM/cPanel based servers
Submitted by vinayras on Sat, 08/04/2012 - 19:51Ever wondered how to list all the cron entries of all users on WHM/cPanel based servers
I have been trying to find a way to list all cron entries of my clients just to make sure things are in proper place.
Here is the small piece of code that helps
for user in $(cut -f1 -d: /etc/passwd); do crontab -u $user -l; done
crontab -l helps in listing root cron entries only. It does not list cron entries of users created through WHM interface.
- vinayras's blog
- 10307 reads
Facebook comments & SEO
Submitted by vinayras on Tue, 08/02/2011 - 07:51Facebook comments has recently emerged as replaced for comment boxes on regular websites. There are many advantages - such as spam control, posting comments as yahoo, Facebook or other users, ability to post on Facebook profile's wall etc.
We started using the Facebook comments on most of our community based websites. But we always wanted to find a way to get the SEO benefits from comments posted on website.
- vinayras's blog
- Read more
- 11965 reads
Preventing cross-site-scripting (XSS) vulnerability
Submitted by vinayras on Wed, 07/27/2011 - 12:28Recently i came across a report at xssed.com, about ebharatjobs.com being vulnerable to cross site scripting (XSS). That report was filed way back in 2009, and we have already fixed that when we upgraded www.ebharatjobs.com in 2010.
I wanted to share the code we used to check the input from users to possibly prevent XSS vulnerability.
// cross-site-scripting (XSS) vulnerability
$q = $_GET["q"];
//remove the script tag and its contents
- vinayras's blog
- Read more
- 8967 reads
Drupal 7: Bulk update taxonomy url aliases
Submitted by vinayras on Wed, 07/20/2011 - 14:49Yesterday, we showed how to Bulk update node url aliases. Now we faced similar problems while generating bulk url aliases for taxonomy terms. For some reason the admin interface was not able to generate them. The screen just struct up.
define('DRUPAL_ROOT', getcwd());
require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
// menu_execute_active_handler();
set_time_limit(0);
error_reporting(E_ALL);
$tid = (int) variable_get("url_alias_last_tid",0);
- vinayras's blog
- Read more
- 9808 reads
Drupal 7: Bulk update node url aliases
Submitted by vinayras on Tue, 07/19/2011 - 11:04eBharatBase.com has more than 2, 60,000 nodes. We changed the pattern of url aliases to be generated for each node. We tried to generate from admin interface of pathauto module, the system hangs everytime.
The reason - query to fetch node was taking much longer to execute, and php/drupal used to show error message since they were not receiving any response.
To tackle this problem, i started writing small but effect piece of code to generate the url alises of all 2,60,000+ nodes.
1) Created script named "generate_url_alias.php" in drupal root folder
- vinayras's blog
- Read more
- 12807 reads
SearchPropertyIndia.com - Find Real Estate Properties with ease
Submitted by vinayras on Mon, 07/11/2011 - 11:21SearchPropertyIndia.com is a vertical search engine targeted to the people looking for properties such as Flat / Apartment, Bungalows, Villas or Land, plots. Visitors can also search for properties available for rent only.
Searching property online can be a tiresome process, and at times you will not be able to find the right kind of property you might be looking for. To make this process easier we have come up with this vertical search engine.
SearchPropertyIndia.com crawls real estate websites, and indexes them. And then people can search them based on city, type, etc.
- vinayras's blog
- Read more
- 15033 reads
ebharatjobs Mobile Job Search
Submitted by vinayras on Tue, 05/24/2011 - 10:52We are very happy to announce the mobile version of eBharatJobs.com - India's most used job search engine.
The mobile version is located at http://www.ebharatjobs.com/m
Redirection from main page is handled through a php script that detects if the referring agent is Desktop or a mobile/handheld device. The mobile devices are shown this new mobile version of ebharatjobs.
The website is live and we are now waiting for feedback from our users.
Thank you
Vinay Yadav
Web Developer
- vinayras's blog
- 7718 reads