ad

Friday, 25 September 2015

What's a Proxy server and how it works for absolute beginners

Figured I'd write a little article on this since there's so many people that seem to be working with proxies without really knowing what it really is and how it works.
-

First things first, for those who don't know what a proxy is, it's a computer, to be more specific, it's a computer running apache or other server software, and those who don't know what apache is, it's a piece of software that runs on a computer which allows a client software to request data from your server using URL. Client software is your web browser. We generally call is 2 tier architecture, this is, client(browser) taking care of presentation and client side data manipulation, and server doing it's job behind the scene in the computer running apache software.

I won't talk about DNS server, but essencially whenever you type URL in address bar and press enter, that URL is translated into IP address AKA dotted squad - DNS does this, it's where the www.example.com address is matched with associated with IP. Then this IP is sent back to your browser and browser then sends requests to it and waits for response back from apache server.

Client server model(picture from pecktechdesigns.com):
[​IMG]

So here we've clients making requests to the server, using HTTP(read more about this protocol here).

Alright so far so good. We've client, it has a regular IP, and we've a server which also has an IP, right. But what if we want to change client's IP. That is where proxy server comes in, you take a server place it between client and server.

So this is how it looks like(picture from forrester-infosystems.wikispaces.com):
[​IMG]
Internet = A computer running apache software.
Server = Web server where you're making requests, server where files or webpage are located.


As you see here, left side computers are clients, middle one is a our new server, and Internet(right side one) is our web server. So whenever the client makes a request for anything from Internet, it goes through the Proxy Server. Proxy server is a new server that's been placed between client and Internet so whatever you do, will go through it. For instance, if you try to visit a website and it's blocked, you should know it was the Proxy Server that dected something in your request. Or look at this one, someone's trying to hack your computer, he wont just be able to go and attack your computer directly, he'll have to go through proxy server. Or check this one out, you're on a little local network that uses proxy server, your server administrator could configure your Proxy Server to cache webpages.. so whoever after you tries to visit the same webapage, will get it without the need to download it again.

Okay so if you're still reading, then keep reading before it's about to get interesting here. When you tell your browser to connect to certain proxy server, lets say you're connected to 1.1.1.1.1.1 server, which's a proxy server, what this server will do is send your request to the server you're requesting data from, while at it, it will hide your IP address and give the requesting server it's own IP address(1.1.1.1.1.1). So basically if your address is 2.2.2.2.2.2, it's giving the server 1.1.1.1.1.1.1.

Check this picture out, we've a Proxy Server located in US which has US IP so whenever you're making request to webpage using that server, that seerver will request the data for you, not letting the web server about your IP. Example, lets say you're making bunch of spammy comments on thebot.net money making website, trying to promote your new blog.. you've been doing this or a day and the administrator has finally noticed it. Now administrator goes to his log file and looks up IP address associated with your account. He wont see your IP address, he'll see this proxy server's address. Lets say he finally decided to block this Proxy Server. What can you do now is simple switch your Proxy Server and you're live again.
Picture from(anfieldroad.com):
[​IMG]

Still reading? Lets make it a even more tricky here. What if you wanted to hide behind multiple Proxy servers? There's a way to do it, there's plenty of sevices that offer hops, it's basically connecting to A proxy server, which's connected to B, which to C and then C finally to your destination server. Making it even more complex to track the source of client/request back.

But remember like I said in the beginning, Proxy server is just a computer. So when you request data from www.example.com through Proxy Server, the Proxy server is sending request to Server, requesting data for you, then uploading that data to your computer. Which mean, faster Proxy Server's internet connection. The faster the process will happen.

Sunday, 6 September 2015

Free e-commerce website | Paypal Payment Options


Completely free of charge ecommerce script | No no hidden costs | Under GNU/GPL license.

This is a small e-commerce website that allows you to sell up-to 4 products. It comes with Admin Panel where you're allowed to Add or Remove Product. Admin Panel also allows you to set the receiver Paypal along with site template information like site title, header, footer logo etc..

IMPORTANT: Just after editing the database information in conn.php file and connecting to database, and importing SQL files your first priority should be to open admin table and edit the user and password. Md5 hash your password when you paste it in password field in database. To md5 just search on google for md5 hash generator and generate your password using it. Then when loggin in, just use regular password.

Rest of it is easy. Once you're in Admin Panel, you'll see three buttons, Add Product, Delete product and Add Site Info. To add a product just click on Add Product button, fill all the details and press enter.
Note that it wont allow you to add any more products than 4. If 4 products are already in database you'll be asked to delete atleast one product.

The Add Site Info button will also allow you to add your Paypal.

And to use the Delete Product option just click the button and you'll be presented with links of your product. To delete a product, just click on it and it'll be deleted.

Make sure atlease 4 products are available on website, or a message will appear asking you to add the missing product.

Also make sure required bootstrap files are not deleted, this site uses bootstrap for document styling and structure.

Lastly, use the script at your own risk.

Script developed by | - samiuddin | phpdevsami@gmail.com | http://wwww.webdevtown.com | https://github.com/phpdevsami

Download
https://dl.dropboxusercontent.com/u/28490184/webdevtown/ecommerce_site.rar

Screenshorts