Sunday, January 18, 2009

How to share Internet connection in Windows XP, 7 & 8

Here is how to share your Internet connection in a way that other computers to be able to use it.  Happy learning and be sure to check my Windows 10 course!

The popular way of doing this is by using a hardware router or a combination of a proxy server and a hub. In the following article, I'll show how to easily share your connection with the Windows integrated Internet Connection Sharing.
 The alternatives:
Hardware router
Pros: - once turned on the device provides an Internet connection.
Cons: - set up, price.

Hub
Pros: - price, allows proper connectivity and data transfer between several computers.
Cons: - doesn't support network address translation(NAT).
+
Proxy server
Pros: - emulates hardware router functionality and gives IP address and port to the clients to provide Internet connectivity.
Cons:
- every client needs to use the Proxy server address
- network connection protocols are not being fully supported

What you'll need:
- one additional network(LAN) card, which will act as an outgoing Internet device
- (optionally) hub, if you are willing to share your Internet with more than one computer
Note: if you are sharing internet connection over Wi-Fi making hotspot, you are just fine with one incoming network card connection!

Let's begin
Server setup
First off you'll have to know whether you've been using:
Dial-up type of connection (PPPoE) providing a username and password or you are directly connected to your provider(ADSL...) without having to enter username and password every time prior to using the Internet.

Windows XP

Open up Start->Settings->Network Connections to see your network cards(LAN). Important: If you are using ADSL find the incoming Internet connection card(i.e through which the Internet comes in) and right-click ->Properties
If you are using LAN + Dial-up find your Dial-up connection(and not the LAN card) and right-click -> Properties(fig. 1)


Fig 1. LAN + Dial-up

On the next screen check the Allow other network users to connect through this computer's Internet connection.


Then you'll be prompted to allow the ICS to change your second(inner) LAN card settings.
From now on it'll have IP 192.168.0.1 and will serve dynamic IP addresses via DCHP to the connected computers(clients).

Other computers setup(clients)
The only thing left to do is to go to Start->Settings->Network Connections, right-click on the network card Properties ->; Internet Protocol(TCP/IP) - then again on Properties.


...and check both as shown automatically


Don't forget to protect the shared connection
When all of your computers already have the Internet it is important to turn on the integrated Windows firewall:
from Start->Run->Firewall.cpl
and then check both: On(recommended) and Don't allow exceptions

Windows 7 & 8

The same procedure applies for these versions of Windows. So first go to Control Panel  -> Network and Internet -> Network and Sharing Center and click on Connections: Local Area Connection. Same can be achieved if you just right click on the network icon from the taskbar ->Properties




Then choose a network connection you want to share with other computers and click on its properties:
Finally from tab Sharing, click on 'Allow Other Network Users to Connect through This Computer’s Internet Connection checkbox.'



How to set up the clients:

they have to use automatic settings for IP and DNS settings.

Now you are ready. Happy surfing!!!

Remarks:
If your home LAN has IP addresses different than 192.168.0.х you'll have to change your DHCP server settings from here: http://support.microsoft.com/kb/230148

Tuesday, December 30, 2008

Easy solve the AJAX c00ce514 error

If your AJAX code runs smoothly on Mozilla Firefox but experiences problems when running on Internet Explorer and gives out an error:
"Could not complete the operation due to error c00ce514"

The error means that Microsoft XML Parser is having problems when parsing the AJAX response string.
Here is what to do: just set the proper character set encoding in your requested file then try again:)

PHP Example:

header("Content-type: text/html; charset=windows-1251");

Cheers!

Sunday, September 21, 2008

Advanced hard drive partition and geometry recovery

Here is the story: After running several Scandisk tests on a 160GB hard drive it failed to show at BIOS system report on reboot. The hard drive was NFTS formatted so I thought that the recovery process should go easy.
I ran my favorite recovery software R-Studio, FileScavenger etc… but they didn’t recognize the hard drive at all. It appeared that drive’s geometry (heads,sectors,cylinders) information was incorrect. So no matter how many file recovery applications I was running the result was the same: unrecognized file system or misplaced file information.

I looked at the hard drive’s sticker and noted the Cylinders Heads Sectors values (information that could also be found in drive's service manual). Then loaded up the free testdisk program and carefully entered those numbers in the Geomety section. But the 160GB hard drive now appeared as 37GB… - what was happening? In order to allocate and handle bigger hard drives sizes engineers have invented: 2 types of addressing: logical and physical - physical were the ones that I found on the drive’s cover. The logical CHS values are chosen by the operating system.

Indeed in this case testdisk was looking for a one more value: the sector size (512, 1024, 2048 or 4092). And since the drive was used on windows I just started the format command dialogue in windows and noticed that the default 'sector size' value is 512. Next searched in Google for my hard drive’s serial number and found the drive's logical CHS values in forum postings from linux 'dmesg' command output as well as other diagnostic tools.

I loaded testdisk’s Geometry with these new numbers, and ran Analyse to rescan the hard drive for partitions and they showed up!
Write followed and after the reboot the hard drive finally showed in the BIOS system report. Windows also recognized the drive but the stored information was still inaccessible.
So I run Filescavenger and restored the information to a blank hard drive. At this point you can also use testdisk. Then reformatted the first drive and moved back the recovered information.
It was a back and forth game but in the end proved worthy!

Monday, August 25, 2008

AJAX & PHP star rating system script

Here is how to make a star rating script for your webpages.
The new and updated version of the script is now tracking all of your web pages automatically. You just have to include it on the desired page.
A new and improved version of the script, along with its explanation can be found in the star rating script course.

if you don't have a database you can create it with first with:

CREATE DATABASE ratings;

then enter the database with :

use database ratings;


and lets set up the MySQL table:


CREATE TABLE IF NOT EXISTS `ratings` (

  `id` varchar(255) NOT NULL,

  `total_votes` int(11) NOT NULL,

  `total_value` int(11) NOT NULL,

  `used_ips` longtext,

  PRIMARY KEY (`id`)

);


Then copy and paste this php code into ratings.php and open the file for edit:

 var http_request = false;  
 function alertContents(response, ret_el) {  
   document.getElementById(ret_el).innerHTML = response;  
 }  
 function makePOSTRequest(url, parameters, ret_el, callback_function) {  
   if (typeof callback_function == 'undefined') callback_function = alertContents;  
   var http_request = false;  
   var activex_ids = ['MSXML2.XMLHTTP.3.0', 'MSXML2.XMLHTTP', 'Microsoft.XMLHTTP'];  
   if (window.XMLHttpRequest) { // Mozilla, Safari, IE7+...  
     http_request = new XMLHttpRequest();  
     if (http_request.overrideMimeType) {  
       http_request.overrideMimeType('text/xml');  
     }  
   } else if (window.ActiveXObject) { // IE6 and older  
     for (i = 0; i < activex_ids.length; i++) {  
       try {  
         http_request = new ActiveXObject(activex_ids[i]);  
       } catch (e) {}  
     }  
   }  
   if (!http_request) {  
     alert('Please update your browser!');  
     return false;  
   }  
   document.getElementById(ret_el).innerHTML = "Please wait...";  
   document.getElementsByTagName("body").item(0).style.cursor = "wait";  
   http_request.onreadystatechange = function() {  
     if (http_request.readyState !== 4) {  
       return;  
     }  
     if (http_request.status !== 200) {  
       alert('Please try again later.');  
       return;  
     }  
     document.getElementsByTagName("body").item(0).style.cursor = "auto";  
     var response = http_request.responseText;  
     callback_function(response, ret_el);  
     return;  
   };  
   http_request.open('POST', url, true);  
   http_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");  
   // http_request.setRequestHeader("Charset", "windows-1251");  
   http_request.setRequestHeader("Content-length", parameters.length);  
   http_request.setRequestHeader("Connection", "close");  
   http_request.send(parameters);  
 }  
 function rate(url_id, vote) {  
   makePOSTRequest('star_rating.php', 'url_id=' + url_id + '&vote=' + vote, 'myspan');  
 }  
 window.onload = function() {  
   var percentstyle = '',  
     rate_percent = 0;  
   var current_rating = document.getElementById("current_rating");  
   if (current_rating) {  
     rate_id = current_rating.getAttribute('data-id');  
     rate_percent = current_rating.getAttribute('data-percent');  
   }  
   percentstyle = 'width:' + rate_percent + 'px;';  
   var content = '<div class="rating" id="rating"><ul class="star-rating"><li class="current-rating" style="' + percentstyle + '" >Current rating</li><li><a id="rate1" class="one-star">1</a></li><li><a id="rate2" class="two-stars">2</a></li><li><a id="rate3" class="three-stars">3</a></li><li><a id="rate4" class="four-stars">4</a></li><li><a id="rate5" class="five-stars">5</a></li></ul></div>';  
   if (document.getElementById("myspan")) {  
     document.getElementById("myspan").innerHTML = content;  
   }  
   var url_id = encodeURIComponent(rate_id);  
   for (var i = 1; i < 6; i++) {  
     (function(i) {  
       document.getElementById("rate" + i).addEventListener("click", function() {  
         rate(url_id, i);  
         return false;  
       });  
     })(i);  
   }  
 }  


<?php  
 $dbhost = 'localhost';  
 $dbuser = '';  
 $dbpass = '';  
 $dbname = 'ratings';  
 $dbtable = "ratings";  
 $conn = mysqli_connect($dbhost, $dbuser, $dbpass, $dbname) or die('Error connecting to mysql');  
 $is_voting = isset($_POST['vote']) ? $_POST['vote'] : ''; //the actual user vote  
 if ($is_voting) {  
   $id = isset($_POST['url_id']) ? $_POST['url_id'] : ''; //passed url_id   
 } else {  
   $id = substr($_SERVER['REQUEST_URI'], 1);  
   $id = htmlentities(urlencode($id), ENT_QUOTES);  
 }  
 //make initial vote check  
 $sql = "SELECT total_votes, total_value, used_ips FROM $dbtable WHERE id = '$id' ";  
 $query = mysqli_query($conn, $sql) or die(" Error: " . mysqli_error());  
 $number_rows  = mysqli_num_rows($query);  
 $numbers    = mysqli_fetch_assoc($query);  
 $checkIP    = unserialize($numbers['used_ips']);  
 $count     = $numbers['total_votes']; //how many votes total  
 $current_rating = $numbers['total_value']; //total number of rating added together and stored  
 $sum      = $is_voting + $current_rating; // add together the current vote value and the total vote value  
 $tense     = ($count == 1) ? "vote" : "votes"; //plural form votes/vote  
 if (!$is_voting) {  
   //check if have voted already  
   $voted = mysqli_fetch_assoc(mysqli_query($conn, "SELECT * FROM $dbtable WHERE used_ips LIKE '%" . $_SERVER['REMOTE_ADDR'] . "%' AND id='$id' ")); //This variable searches through the previous ip addresses that have voted and returns true or false  
   //when already voted  
   if ($voted) {  
     echo '<ul class="star-rating"><li class="current-rating" style="width:' . @number_format($current_rating / $count, 2) * 25 . '%;"></li></ul>  
 Rating: <strong>' . @number_format($current_rating / $count, 2) . '</strong> ( ' . $count . $tense . ')  
 <br /><span style="color:red;">You have already voted.</span><br />';  
   } else {  
     //if not voting just show the current rating  
     //set data for the css  
     echo '<div id="myspan"><span id="current_rating" data-id="' . $id . '" data-percent="' . @number_format($current_rating / $count, 2) * 25 . '"></span></div>';  
   }  
 }  
 //if not voted do the actual voting  
 if ($is_voting) {  
   //open initial voting row if necessary  
   if ($number_rows == 0) {  
     $sql = "INSERT INTO $dbtable (id, total_votes, total_value, used_ips) VALUES ('$id', '0', '0', '')";  
     $result = mysqli_query($conn, $sql) or die("err");  
   }  
   //increment votes, check ips & add/update vote to table  
   if ($sum == 0) {  
     $added = 0;  
   } else {  
     $added = $count + 1;  
   }  
   if (is_array($checkIP)) {  
     array_push($checkIP, $_SERVER['REMOTE_ADDR']);  
   } else {  
     $checkIP = array(  
       $_SERVER['REMOTE_ADDR']  
     );  
   }  
   $insert = serialize($checkIP);  
   mysqli_query($conn, "UPDATE $dbtable SET total_votes='$added', total_value='$sum', used_ips='$insert' WHERE id='$id'") or die("Error");  
   echo $response = '<div class="rating">Your rating:' . $is_voting . ' <br />';  
   echo '<ul class="star-rating"><li class="current-rating" style="width:' . @number_format($sum / $added, 2) * 25 . '%;"></li></ul>';  
   echo 'Overall rating: <strong>' . @number_format($sum / $added, 2) . '</strong> <br />   
   <span style="color:red;">Thank you for your vote cast!</span></div>';  
   //echo iconv("windows-1251", "UTF-8", $response);  
 }  
 ?>  


You can also explore the full version of the script in the course.

Enjoy!

Saturday, February 09, 2008

Free light antivirus applications for personal use

Most people usually complain of antivirus software slowing down their computers. They look for a fast scanning & reliable antivirus program that won't miss new virus threats, already combined with an integrated shield protecting their system from further infection.
This time I'll present you the 3 free applications: Spyware Terminator anti-spyware, Avira as well as 360 Security antivirus
For more antivirus comparisons, you can take a look at this Windows 10 course


spyware terminator

http://www.spywareterminator.com
After playing with I will share the features of Spyware Terminator which I've found useful:
It has a light and almost intuitive easy to use interface. Virus scanning is fast and the program virus definitions are updated daily supporting peer-to-peer downloads.   Program's executable takes very little memory fingerprint which when compared with Norton Antivirus, BitDefender, Avast, Kaspersky(KAV) and Nod32 the program takes the smallest amount of computer's memory.
The integrated real-time antivirus shield functions nicely and actually stop virus infections. The program catches objects (spyware, adware, trojans & viruses) better than both SpyBot and AdAware.
Once finished with full spyware and virus scanning Spyware terminator enables its unique HIPS protection. HIPS is short for Host Intrusion Prevention System - a system that maps the local files on your hard drive. Then if an unknown virus is found the antivirus easily restores the infected file without damaging it. There's no need to worry: the whole mapping will not slow your computer or take a lot of your hard disk drive space.
Also, a nice feature of the program is that it manages and uninstalls easily the resident(remaining in computer's memory) viruses and trojans even the one spawned from processes such as explorer.exe without a need of system restart.
After each cleaning process, you'll see that Spyware Terminator creates a clean windows restore point. This allows you to get your system back from times when the computer has been in good shape.
In case you find unknown adware, virus or trojan you can send the infected file to the spyware terminator labs for an examination - either with the application itself or using their website forum. In a few weeks, the updated antivirus definitions will be released thus fixing your problem.
Playing games, installing software
You can switch off Internet Shield mode as well as Internet guard to receive less notifying pop-ups from the application when installing new trusted software.

AVIRA
For ensuring more serious protection, I would also recommend using the free version of Avira Antivir, which has a residential shield, occupies a small amount of system memory and constantly checks its database server for new updates. An interesting part of Avira is that during installation it will warn you if there are other installed/incompatible antivirus versions on your computer.

http://www.avira.com/en/free-antivirus-windows

 Last but not least I would like to present to you the most powerful one which is called 360 total security.
It can be downloaded for free here: http://www.360totalsecurity.com/

http://static.ts.360.com/home/images/home/screenshot.en-6b734003.jpg

The antivirus program has an exceptionally good database against viruses, also lots of free additional tools for speeding up the computer, cleaning up registries as well as old windows backup files. Not to mention its useful residential shield.

And please don't forget
After downloading and installing any antivirus software, please update program's definitions usually from menu accessible with right on the application's taskbar icon.

Cheers!

Sunday, April 15, 2007

Deoptimising - a new way of SEO

I'll start this post with the assumption that you could have experienced problems with the Google ranking algorithms.
Let's say you are writing new content and for certain keywords instead of first it appears immediately on the 3rd page or even at the end of search results. A possible reason might be that your website could have lost its trust-rank and have the so-called 950 penalty applied at runtime by Google. In order to restore our rankings here is what you can do. And in the meantime, you can learn a bit more about the SEO topic from my online course.

Check whether you need to deoptimize:
If you want to see all the non-supplemental pages from your just type in google:
site:www.yourwebsite.com/*

Then to see just the supplemental pages from your site type:
site:www.yourwebsite.com/ -site:www.yourwebsite.com/*

Keep the ratio below 50%

Also try the automated supplemental ratio tool: http://www.mapelli.info/tools/supplemental-index-ratio-calculator

What to do next:
1. Validate your website

2. If you use plenty of H1, H2, H3 tags remove most of them or replace 'H1' with stylized 'H2' or 'span' and 'strong' tags.

3. Don't use same data in: 'title', 'h1', 'meta description' tags.

4. In your website, inner-linking navigation uses the same linking structure. Using the same 'title' attributes in the menu on every page of your site is considered spam.

5. Your affiliate/referral links should differ in the anchor text. Please check the 'title' attributes to be unique and avoid keywords stuffing there.
Pay special attention to 'title' and 'alt' attributes: if they are overstuffed google bot will just place the first few lines of your page as a description in its search results which turns to be your repeating website heading information.
Solution: examine what your search results look like(site:http://www.yourwebsite.com), see what exactly indexes google and make according to changes ie. reduce the 'title' attributes.

6. Remove any static content from the bottom page of your website especially the outbound links, etc...

7. Check your affiliate links whether they are thematic or not. Remove those that are not connected to your site theme or add rel="nofollow" to them. If your site displays RSS feeds be sure to add rel="nofollow" also.
Update: Try this tool to find whether you are linking to bad neighborhood websites: http://www.bad-neighborhood.com/text-link-tool.htm

8. Lower your content keyword density
http://www.webconfs.com/keyword-density-checker.php
Keyword density is an important factor if you're serious in SEO. Once you have a great kind of content, the crucial part is to be able to present it in front of the right public.
And by having keyword density above, for example, the threshold of 2 - 4% will mark your content as thin and it won't compete/show with other websites in SERPS.

- check out your navigation (posts archive) - too many links to posts with keywords in their titles increase the overall post keyword density so be careful.
- when using forms you may also look over your hidden field values: do not use keywords there - it's an easily misunderstood issue.

- also, don't forget to check your content for being detected as potential spam:
http://tool.motoricerca.info/spam-detector/

9. Limit the usage of 'title' attributes in the <a href> tags as well as <b>/<strong> tags -> they weigh to the content presented in the SERPS.

These might sound like drastic measures but I've already managed to escape 3 websites using the above techniques. So experiment and look at what will happen. Wait and hopefully soon you'll be out of google's supplemental index too.

Load your navigation/advertising section using AJAX request not purely via JavaScript.

Check google's webmaster's tools and fix if there are any potential duplicate issues.

Check all of your sub-domains for supplemental results and fix them as soon as possible.
You know the benefits of organic SEO long-lasting effect versus the link - driven short term success. Here are some simple steps for your website to ensure a long term quality traffic flow from happy visitors.

My websites - full with unique content and constantly expanding, had a problem - plenty of pages gradually went to the supplemental index (ie. 50 out of 500 results were in the main index). After lots of experiments and reading below are my guidelines on how to organically do an on-page optimization or how easy to get more of your content indexed:

Paginated results
Ensure unique meta description wherever you can on your website, even on the paginated results:  If you have an article with lots of comments - on the 2nd onward comments page strip the article text leaving just the comments. This way you'll create a brand new unique content page, just like in forums.

Repetition and bold text
Put special attention to em (italic) and bold tags - they add weight to the web page and if repeated through the pages, they could trigger google's penalty filter. Remove repeated word occurrences such as: Reply to this comment, Vote, etc... - replace such text using unobtrusive JavaScript.

Unique heading and meta descriptions
Look especially at the headings like H1, H2, and make sure that they are unique and not repeating.

Loading time
Improve loading time: inspect page loading time with Yahoo's YSLOW and Google's PageSpeed browser addons and try to make most of the suggested improvements. You can also press F12 to open up Developer Tools in Chrome or Firefox and inspect your content from the network tab to detecting slow-loading elements:


let's recap on the main speed improvements how:
- make cache version of your pages
- use asynchronous Google analytics and social sharing buttons such as facebook, twitter, etc.
- place all your JavaScripts at the bottom of your page - this way the page content will load first.
- gzip your CSS and js files
- beware of WordPress wp-cron.php file - it hogs the system CPU resources down and might get you banned from your hosting provider: just rename it or find where is used and disable all calls(includes) to this file, etc...).

Blogger users
If you use Blogger's hosting use this sitemap tool and provide the generated sitemap in Google's Search console. Benefits are that this way you can submit your all posts for indexing.

Canonical urls
Check whether your website is listed in SERPS listings both via http://yourwebsite.com , http://www.yourwebsite.com or http://yourwebsite.com/index.php

If that's the case you'll have to:
1. Manually rewrite all your: internal links to the already indexed/preferred (www or non-www) version.
2. Permanently redirect using .htaccess mod_rewrite your http://yourwebsite.com/index.html or http://yourwebsite.com/index.php page to the root domain of your indexed website URL (i.e http://www.yourwebsite.com/).

Link weight

Use Supplemental Results Detector http://www.seo4fun.com/php/pagerankbot.php to distribute evenly link weight between your pages.

Source Ordered Content
Display your content first to search engines via CSS - especially true for the new Panda update.

Log your results
Write in a text file the date on which you make changes, then check your statistics the next week to determine whether they are beneficial or not.

Sunday, March 04, 2007

Acne - clean your liver

Acne - liver connection
During puberty toxin levels in the body are higher because of its increased metabolism and rapid growth. At that time the liver( as the main filtering organ) can easily become overwhelmed. When that happens, body triggers its natural response of flushing out the toxins through the skin resulting in an acne breakout. One way to restore the liver's normal functioning is via cleanse.

Daily cleanse recipe
If you want to purify and detoxify your body from inside here is a recipe that you can do daily until you notice further improvement. It's nothing more than a salad dressing so it's harmless, unless you've got some serious liver issues.

Put the following ingredients into a glass:

1 glass of water
1 tablespoon of cold pressed virgin olive oil
juice of one lemon
2 garlic cloves
pinch of ginger

Stir or blend the mixture and drink on an empty stomach. Also if you’ve acidified your body’s Ph due to stress, negative emotions or improper diet, the drink will balance it back to normal(due to the lemon's alkaline properties). Proper alkalization of the whole body Ph, takes around 30 days, combined with green juices like Spirulina.

Fibre
Also, take additional fibre to introduce more good bacteria in your stomach. Fibres keep the toxins and cholesterol from being reabsorbed into the blood and help to be excreted normally. Good source of fibre are the probiotic cultures of Lactobacillus Bulgaricus and Lactobacillus Bifidus found in yoghurt.

Don't forget to drink 8 glasses of water daily. On the 5-6day you'll notice the difference. The receipt has also a beneficial effect on backne.


Additionally
Here is a list of herbs that might relieve your symptoms caused by improper liver_functioning. You could prepare herbal tea or an extract out of them. And please consult a qualified physician before consumption.

Dandelion root & leaves, Burdock root, Senna Alexandrina, Berberis Vulgaris or European Barberry, Cascara Sagrada, Cayenne Pepper, Fennel, Aloe Vera, Rhubarb, Marjoram, Cat's Claw, Comfrey(Symphytum), Chicory, Goldenrod(Solidago), Hortensis Root, Marshmallow Root, Bear's Grape, Thistle, Hydrastis, Liquorice, Glycyrrhiza glabra...

Subscribe To My Channel for updates