Aug 22
Recent i found a browser that supports Win/Mac/Iphone This sins i found this browser i never use Chrome anymore. The nice thing of this browser is that its build for Socialmedia (Facebook)
Its free! Works nice!
Download it here: http://www.rockmelt.com/
written by admin
Aug 02
A few days ago i create my own domain name availability script, First i used the servers to do a lookup, but after a while the servers where blocking me and telling me that im only allowed to check X serval of times every X minutes (depends the extension thats why i put X). After some Googling i created a script myself without whois servers to check if the domain is in use or not. You can just copy and paste the code and it will work.
<?php
function checkDomainAvailability($domain) {
$results = @dns_get_record($domain, DNS_ANY);
return empty($results);
$con = fsockopen($server, 43);
if (!$con) return false;
fputs($con, $domain."\r\n");
$response = ' :';
while(!feof($con)) {
$response .= fgets($con,128);
}
fclose($con);
if (strpos($response, $findText)){
return true;
}
else {
return false;
}
}
if( !isset($_POST['domain']) ){
?>
<form action="test.php" method="post"><input style="width: 370px; background-color: #fff; border: 1px solid #aaaaaa; height: 30px;" type="text" name="domain" /><input type="checkbox" name="nl" checked="checked" /> <strong>.nl</strong>
<input type="checkbox" name="eu" checked="checked" /> <strong>.eu</strong>
<input type="checkbox" name="be" checked="checked" /> <strong>.be</strong>
<input type="checkbox" name="com" checked="checked" /> <strong>.com</strong>
<input style="width: 200px; height: 30px; background-color: #aaaaaa; border: 0px; color: #fff; font-weight: bold; font-size: 14px;" type="submit" value="Check" />
</form>
<?php
}else{
$domain = $_POST['domain'];
if($_POST['nl'] == 'on'){
if(checkDomainAvailability($domain.'.nl') == true) {
print $domain.".nl FREE<br />
";
} else {
print $domain.".nl NOT FREE<br />
";
}
}
if($_POST['be'] == 'on'){
if(checkDomainAvailability($domain.'.be') == true) {
print $domain.".be FREE<br />
";
} else {
print $domain.".be NOT FREE<br />
";
}
}
if($_POST['eu'] == 'on'){
if(checkDomainAvailability($domain.'.eu') == true) {
print $domain.".eu FREE<br />
";
} else {
print $domain.".eu NOT FREE<br />
";
}
}
if($_POST['com'] == 'on'){
if(checkDomainAvailability($domain.'.com') == true) {
print $domain.".com FREE<br />
";
} else {
print $domain.".com NOT FREE<br />
";
}
}
}
?>
written by admin
Jul 29
Hi in this post im going to show you how to make a image using PHP GD library, I’m going to make a 4 bar stats image. copy this code in a .php file to see the Graph that comes out. i comment in my code so you people understand what I’m doing.
<?php
$img = imagecreate(490, 160); // CREATE THE IMAGE
$black = imagecolorallocate($img, 0, 0, 0); // BACKGROUND COLOR OF IMAGE
$yellow = imagecolorallocate($img, 240, 210, 40); // COLOR OF THE BARS
$line = imagecolorallocate($img, 255, 255, 255); // LINE ON THE BOTTOM
$bar1 = '60'; // AMOUNT (px from top) BAR 1
$bar2 = '20'; // AMOUNT (px from top) BAR 2
$bar3 = '10'; // AMOUNT (px from top) BAR 3
$bar4 = '20'; // AMOUNT (px from top) BAR 4
imagerectangle($img, 10, 151, 490, 151, $line); // BOTTOM LINE
imagefilledrectangle($img, 80, $bar1, 100, 150, $yellow); // BAR 1
imagefilledrectangle($img, 180, $bar2, 200, 150, $yellow); // BAR 1
imagefilledrectangle($img, 280, $bar3, 300, 150, $yellow); // BAR 1
imagefilledrectangle($img, 380, $bar4, 410, 150, $yellow); // BAR 1
header ("Content-type: image/jpeg");
imagejpeg($img, NULL, 100); // $img var , IMG name (or NULL) , IMG Quality
imagedestroy($img); // UNLOAD IMG
?>
I hope this helps people with there first steps of using the GD library
written by admin
Jul 28
As the internet grows by the day, so are the infected files spreading there self’s true the web. I tested a few antivirus programs that came on my path (Norton ,McAfee ,NOD and AVG) I have to say that NOD also is a great antivirus program, but still i like AVG the most. now i have installed on al my computers and laptops AVG Free and it does everything i want from a Anti virus: download AVG Free CLICK HERE
written by admin
Jul 11
If you are willing to take you PHP-skills to the next level its quite important to learn how to work with classes. for the beginners i made a very simple and small classes that lets you open or close your MYSQL Connection
File db.class.php:
<?php
class db{
// make connection
public function connect($action="start"){
$user = 'username'; // MYSQL username
$pass = 'password'; // MYSQL password
$host = 'localhost'; // MYSQL hostname
$db = 'database'; // MYSQL database
static $con = '';
// Open connection
if($action == "start"){
$con = mysql_connect($host,$user,$pass);
mysql_select_db($db, $con);
}
// Close connection
if($action == "stop"){
mysql_close($con);
}
}
}
?>
Now you can easy use in you script the folowing to connect to you database
include("db.class.php");
$db = new db;
$db->connect();
$sql = "SELECT * FROM tablename";
$result = mysql_query($sql);
while($row = mysql_fetch_array(result)){
echo $row['id'];
}
$db->connect('stop'); // this command is not necessary to use
Building you website with a database class is very useful when you build it for someone else be cos its easy to change you database setting for the complete project
written by admin
Jul 08
In this post i will show how you can change the html/content inside a div. in my example i will use a selectbox to change the div’s content.
HTML Form
<div style="width: 100; float: left;">Type</div>
<div style="width: 200; float: left;">
<select id="type">
<option>Type code</option>
<option value="text">Tekst</option>
<option value="link">Link</option>
</select>
</div>
Javascript code (put in header)
$(document).ready( function() {
$('#type').change(function() {
if( $('#type').val() == 'text'){
var putindiv = "<br /><b>Titlefield 1</b><br /><textarea name='text' style='width: 300px; height: 150px;'></textarea>";
$("#formhtml").html(putindiv);
}
if( $('#type').val() == 'link'){
var putindiv = "<br /><b>Titlefield 2</b><br /><input name='text' type='text' style='width:300px'>";
$("#formhtml").html(putindiv);
}
});
});
As you can see: the selectbox is getting the form value by the id (type) and the JQuery changes the html inside the div with id: formhtml
written by admin
Jul 08
After installing Joomla on my VPS server (that runs on Ubuntu) i had problems with the permissions. I don’t like to put my directory with chmod on 777 that why i did some research i came with the following solution
1. Open a SSH connection.
I use putty download here
2. Navigate to the website folder
cd /home/httpd/vhosts/[yourDomain.com]
3. Set rights to www-data
chown -R [UserName]:www-data httpdocs
chmod -R g+w httpdocs
find httpdocs -type d -exec chmod g+s {} \;
This worked for me and i hope to help some people that have the same problem and need a proper solution
written by admin