The Web is growing rapidly. Each day, new features are arriving. With the coming of AJAX, many websites became more easy to handle. With jQuery, websites became more attractive with animations and styles. In this tutorial, we are going to create a stylish animated Login Form with jQuery, CSS & AJAX. With this, the login time for the user is greatly reduced as the page shouldn’t be loader all over again.
... [READ MORE]Posts marked with "HTML" in categories
Installing Laravel In Sub Directory & Deny Access To It
Laravel is a PHP framework that reduces the work load of creating PHP applications. As it is a framework, there are limitations and some problems just like any other PHP program.
Laravel framework has a “public” folder. The HTML files that are going to be displayed on Web Server will be from this folder. Since it is a sub directory of the framework, to access the real site, we would have to go to the following URL :
... [READ MORE]How To Set Same Cookie On Different Domains
You might have seen sites like Google setting the login status cookie on the various domains of theirs (YouTube, Blogger). As you may know, cookie can’t be set in a different domain from another domain directly.
If you’re having multiple sites in where you need to set a cookie from a parent site, you can use basic **HTML **and JS to set the cookies. Google is using this same way.
... [READ MORE]Compress PHP Site – HTML, CSS & JS
UPDATE
Site Compressor is now an app on Lobby. To use Site Compressor, download Lobby and install Site Compressor app.
Compressing / minifying a site’s code will improve the data transfer from server to the client. The browser will be easily able to get the content from server. There are a lot of benefits that comes with site compression. I use compression too in my own way. My site Open is heavily compressed.
I compressed sites using Python by using loops to iterate over files and replace strings, compress according to my needs. But, every time I had to open a Terminal to give the request and there will be some kind of errors when something new is added to the site.
... [READ MORE]Create An Advanced Crawler In PHP
Crawlers are everywhere. They move on and on to many webpages each second. The most biggest of them are Google’s. It already crawled almost 90% of the web and is still crawling. If you’re like me and want to create a more advanced crawler with options and features, this post will help you.
When I created my Search Engine test project, it needed an awesome crawler. I knew that developing one on my own will be hard especially when you have to follow robots.txt and other rules. So, I googled and found this great library which is 10 years old !
... [READ MORE]Create a Search Engine In PHP, MySQL | Part 3
This is the Part 3 of “How To Create A Search Engine In PHP”. In this part, We make additional adjustments and make the search engine more awesome and cool.
Bot Page
Our crawler leaves a mark on every pages it visit. In other words a custom User Agent String goes with each requests to web pages. In the previous part, we set the user agent string as :
DingoBot (http://search.subinsb.com/about/bot.php)
We add a URL with it, because if the site owner sees this in their stats, they would think “what’s that ?”. So, to answer that question we add our bot info link. Also to promote our site.
... [READ MORE]Create a Search Engine In PHP, MySQL | Part 2
This is the Part 2 of “How To Create A Search Engine In PHP”. In this part, We’ll add code to files that are being displayed to the users. We make the database and the table in this part.
index.php
The main page of our Web Search is index.php. It has a simple design and is not very advanced as Yahoo or something else.
<?include("inc/functions.php");?>
<html>
<head>
<?head("", array("index"));?>
</head>
<body>
<?headerElem();?>
<div class="container">
<center>
<h1>Web Search</h1>
<form class="searchForm" action="search.php" method="GET">
<input type="text" autocomplete="off" name="q" id="query"/>
<div>
<button>
<svg class='shape-search' viewBox="0 0 100 100" class='shape-search'><use xlink:href='#shape-search'></use></svg>
</button>
</div>
<p>Free, Open Source & Anonymous</p>
</form>
</center>
</div>
<?footer();?>
</body>
</html>
We use simple functions for every files. head() function accepts two parameters. The first parameter is the title of the web page. The main site title will automatically be appended to the title you give in the first parameter when it’s displayed as
Create A Search Engine In PHP, MySQL | Part 1
When we all search on the web using Google, Yahoo or Bing, we are curious about how it works and how it gets all the information on the web. When us programmers started coding, we all wanted to create a search engine. I too attempted to create a search engine and I ultimately failed (3 years back). But now, I improved my coding skills, improved my knowledge and ideas. So, I decided to create a new search engine with automatic crawling, indexing and stuff.
... [READ MORE]Group Chat In PHP With Users’ Typing Status
I wrote a post on creating Group Chat in PHP. A comment was posted by Ravi asking if it was possible to include user’s typing status. It was a fascinating and a good idea to add user’s typing status. So, I worked on the code and knew it was possible. I’m going to tell you how to implement the display of users’ typing status on the Group Chat I created earlier.
... [READ MORE]Check If A String Is HTML In PHP
HTML detection can be hard, because HTML is complicated and there aren’t any good 100% parsers for HTML. RegEx won’t help you in detection, so you need something else. The trick to identify HTML which I’m gonna show you is very easy. It’s fast, short and doesn’t use RegEx. You can simply use an if statement to check if a string is HTML or not.
PHP’s strip_tags function when given a string, it returns a string that doesn’t have any HTML / PHP characters (according to the manual). So, if we give a HTML string to strip_tags(), it strips out the HTML code from it and return a normal string.
... [READ MORE]