Jump to content


Check out our Community Blogs

debtboy

Member Since 30 Aug 2009
Offline Last Active Sep 04 2013 05:52 PM
-----

#526327 Sharepoint style website on a linux based web server?

Posted by debtboy on 18 November 2009 - 02:59 PM

Open Source Enterprise Content Management System (CMS) by Alfresco
  • 1


#525445 Processing on the Web

Posted by debtboy on 15 November 2009 - 09:20 AM

This tutorial is a brief intro to the Processing Language
and Processing.js (Processing ported to Javascript).

The Processing Language
Here is the opening paragraph from Processing.org
Processing is an open source programming language and environment for people who want to program images, animation, and interactions. It is used by students, artists, designers, researchers, and hobbyists for learning, prototyping, and production. It is created to teach fundamentals of computer programming within a visual context and to serve as a software sketchbook and professional production tool.

Below are 2 images where I use the Processing IDE to create a simple animation and execute it.

Posted Image

Posted Image

I have to say...
Processing is by far the easiest language I've tried, but it offers some awesome graphic capabilities.
The syntax is very easy to understand, just click Help -> Reference in the IDE or click the
Reference Tab at Extended Language (API) \ Processing 1.0

Posted Image


Processing.js (Processing Language ported to javascript)
Here is the opening paragraph from Processingjs.org
Processing.js is an open programming language for people who want to program images, animation, and interactions for the web without using Flash or Java applets. Processing.js uses Javascript to draw shapes and manipulate images on the HTML5 Canvas element. The code is light-weight, simple to learn and makes an ideal tool for visualizing data, creating user-interfaces and developing web-based games.
Processing.js runs in FireFox, Safari, Opera, Chrome and will also work with Internet Explorer, using Explorer Canvas.

Processing.js requires a few javascript files/libraries which can be downloaded here:
Processing.js

Posted Image


The commands available for Processing.js are slightly reduced and can be found here:
Processing.js. It you click the "toggle all" link on this page, it shows the Processing commands that are not available to Processing.js

Posted Image

Here is a simple website using the script I created above.

<!DOCTYPE html>
<html>
<head>
  <title>Debtboy's Processing Language Site</title>
  <script src="./js/init.js"></script>
  <script src="./js/processing.js"></script>
</head>

<body>
  <center>

  <h2>Debtboy's Processing Ported to Javascript Site</h2>

  <script type="application/processing" target="debtboy_canvas">
    float a = 0.0;
    float s = 0.0;
    PImage img1;

    void setup()
    {
      size(400,400);
      noStroke();
      frameRate(20);
      img1 = loadImage( "./images/debtboy_cow.jpg" );
    }

    void draw()
    {
      background(255);
      a = a + 0.04;
      s = cos(a)*2;
  
      translate(width/2, height/2);
      scale(s); 


      image(img1,-103,-90);
    }
  </script>
  <canvas width="300" height="300" id="debtboy_canvas"></canvas>
  <br></br>
  </center>
</body>
</html>

Note the javascript libraries in the <head></head> section:
<script src="./js/[COLOR="red"][B]init.js[/B][/COLOR]"></script>
  <script src="./js/[COLOR="red"][B]processing.js[/B][/COLOR]"></script>

Note the simple script creating this neat graphical effect:
<script type="[COLOR="red"][B]application/processing[/B][/COLOR]" target="debtboy_canvas">
    float a = 0.0;
    float s = 0.0;
    PImage img1;

    void setup()
    {
      size(400,400);
      noStroke();
      frameRate(20);
      img1 = loadImage( "./images/debtboy_cow.jpg" );
    }

    void draw()
    {
      background(255);
      a = a + 0.04;
      s = cos(a)*2;
  
      translate(width/2, height/2);
      scale(s); 


      image(img1,-103,-90);
    }
  </script


Note that the canvas object is used:
<[COLOR="red"][B]canvas[/B][/COLOR] width="400" height="400" id="debtboy_canvas"><[COLOR="red"][B]/canvas[/B][/COLOR]>


Here is a link to my website with the animation:
Debtboy's Processing Language Site


Below are a few website images (at different points) of the running animation:

Posted Image

Posted Image

Posted Image

Posted Image

I'm quite impressed by Processing and Processing.js capabilities. I'll be experimenting quite a bit with this language on my member website. It's very easy to understand and use which are sought after features for a lazy programmer like myself :D

If you haven't already... give Processing (Processing.js) a try. :thumbup1:
  • 5


#517273 Cron/Crontab Basics:

Posted by debtboy on 20 October 2009 - 02:48 PM

What is Cron?
What is a Cron Job?
What is Crontab?

:confused:

I'm going to go over just the basics:
I think the name cron comes from chronos (Greek for time),
but it could be an acronym for (Command Run ON)

Cron or Crond is a daemon, which runs in the background and executes
jobs (cron jobs), such as programs, scripts or individual commands
automatically at predetermined times or intervals.

I'll be using Fedora 11 for this demonstration as it was much cleaner
then my normal system, which already has many cron jobs scheduled.

Cronie a fork of vixie-cron (the standard), is what's installed by default
on Fedora and works just fine.
Posted Image

First we want to determine if the cron daemon is running.
There are many ways, but I use a simple process command
piped into grep.
Posted Image

As you can see, it's running.
Posted Image

Now lets look at the cron files and directories in /etc
Posted Image

If we simply want to run a script on a hourly, daily, weekly or monthly
basis, we just drop an executable script into the appropriate directory
(cron.hourly, cron.daily, cron.weekly or cron.monthly) and were done,
but I'd like to have a little more control over my jobs than that.

So lets start by configuring user access. You noticed a cron.deny file
in the image above and that's exactly what it's for, denying access to
crontab files.
What are crontab files?
Crontab files are how you configure your cron jobs, I'll get into more
detail later. Access to crontab is controlled by 2 files:
cron.allow and cron.deny
Cron.deny is installed by default, I would have to create cron.allow
if I wanted it. If cron.allow exists, then only the users named in that
file will have access to crontab and if cron.deny exists, then any user
named in the file will not have access to crontab.
I have a cron.deny file:
Posted Image

Now I'm going to add/append my user name (debtboy) to the
cron.deny file. You see I've become root to accomplish this.
Posted Image

Let's use the more command to see that I've been added to the file.
Posted Image

Now I'm attempting to access crontab with no luck, because of the
cron.deny file.
Posted Image

As root, I use vi to remove debtboy from the file and again use
more to confirm.
Posted Image


In this next section, I'm going to create a personal crontab file
and schedule a job or two.
Personal crontab files on Fedora and many other systems are stored
in the /var/spool/cron directory as the name of the user.
You can see from the image that no crontab files currently exist.
Posted Image

Now you can see, I'm (debtboy) creating a file using crontab -e.
Crontab has a few options -u (user) -l (list) -r (remove) -e (edit)
see man pages for more info.
Posted Image

and from this image, you can see, I've created one.
Posted Image

Here is the simple cron job I created, redirect standard ouput
of the date command into a file named date.txt
Posted Image


Now lets go over the crontab configuration /etc/crontab
Posted Image
SHELL, PATH, MAILTO and HOME are self explanatory, so lets
look at the first 5 parameters, separated by a space.

Just like the image shows, each parameter is a time scheduling option
which also accepts "/" inputs which are basically intervals. For example
*  02  *  *  *   means every day at 2 O'Clock 
*  */02 *  *  * means every 2 hours

Here are a few examples:
01   *    *    *    *  (The first minute of every hour)
*/05 *    *    *    *  (every 5 minutes)
20   05   *    *    *  (at 5:20 AM)
*    *    29   *    *  (29th of every month)
*    *    *    *   1-5 (Monday thru Friday)
*    *    /02  *    *  (every 2 days)
01   22   12   1    *  (January 12th @ 10:01 PM)

As you can see from the image below...
I've added a second cron job to my file.
of course I use vi ;)
Posted Image

I again use more to verify
http://home.comcast....tboy/cron19.png

Here I quickly look at the 2 outputs I'm already getting
because the cron jobs started as soon as I updated/saved
the file.
http://home.comcast....tboy/cron20.png

Now I better stop those jobs before date.txt eats up my hard drive. :cool:

These were just a few of the basics, I hope it makes
cron a little more understandable.

NOTE:
By setting the time for a cron job to run, we assume that
the unix/linux machine will be running 24/7, but Linux has
become a popular desktop OS, so in turn we have to assume
that machines will be turned off and on randomly.
How do we account for this... anacron a cron supplement.
Look into it. ;)
  • 3


#515160 The final blow vs. Java

Posted by debtboy on 11 October 2009 - 12:38 PM

On posts like these, be sure to put a
(IMHO) In my humble opinion or something similar. :)

I personally like scripting, but I've seen some truly
AWESOME java applications. My personal opinion or
IMHO, I judge a language on its output as opposed to
ease of use. In other words, a large sampling of finished
applications gives me a better opinion of a language,
than I could ever determine by writing things myself.
Java has proven itself time and time again, so
if you have a problem with structures or syntax, there
are many other options.
I believe in the right tool for the job, which means everything
taken into account (users, time spent, interfaces, platform, portability,
life cycle, etc...) In my situation, time spent is fairly significant
as is platform which usually steers me toward higher level languages.

It's all about what's right for you and your situation.
All in all, I've found C/C++ and Java to be difficult to use as it requires
much more knowledge than I have, to use it effectively.

NOTE:
I have no opinion on teaching a language, as I've only taught my
daughter...
and she seems to pick up most everything I show her.
  • 1


#514285 RSS Reader - Perl

Posted by debtboy on 09 October 2009 - 04:20 PM

Posted Image This script parses the CodeCall RSS 2.0 Feed on the front page.

I was reading an Announcements post in the General Forum about RSS Feeds
and got the idea to create a perl script post for my member website.
Then I figured... Why not kill 2 birds w/ one script and make a tutorial also.

Here is the complete script:
#!/usr/bin/perl

$feed_link="http://forum.codecall.net/external.php?type=RSS2";

system("wget -q $feed_link -O /home/debtboy/cgi-bin/feed.txt");

$feed_file="/home/debtboy/cgi-bin/feed.txt";

open(RSSFILE, "<", $feed_file);

$item_detect=0;
$header_title=0;
$header_desc=0;

while(<RSSFILE>)
{
  if($item_detect =~ /[01]/)
  {
    if(/<title>/../<\/title>/)
    {
      $whitespace = index $_, "<";
      $title_string = substr $_, $whitespace;
      $title_string =~ s/<title>//g;
      $title_string =~ s/<\/title>//g;
      chomp($title_string);
      print "\n\nRSS FEED:           $title_string\n";
      $header_title=1;
    }
    elsif(/<description>/../<\/description>/)
    {
      $whitespace = index $_, "<";
      $description_string = substr $_, $whitespace;
      $description_string =~ s/<description>//g;
      $description_string =~ s/<\/description>//g;
      chomp($description_string);
      print "FEED DESCRIPTION:   $description_string\n\n\n";
      $header_desc=1;
    }
    $item_detect = ($header_title + $header_desc);
  }
  else
  {
    if(/<item>/../<\/item>/)
    {
      if(/<title>/../<\/title>/)
      {
        $whitespace = index $_, "<";
        $title_string = substr $_, $whitespace;
        $title_string =~ s/<title>//g;
        $title_string =~ s/<\/title>//g;
        chomp($title_string);
        print "Title:     $title_string\n";
      }
      elsif(/<link>/../<\/link>/)
      {
        $whitespace = index $_, "<";
        $link_string = substr $_, $whitespace;
        $link_string =~ s/<link>//g;
        $link_string =~ s/<\/link>//g;
        chomp($link_string);
        print "URL Link:  $link_string\n";
      }
      elsif(/<pubDate>/../<\/pubDate>/)
      {
        $whitespace = index $_, "<";
        $date_string = substr $_, $whitespace;
        $date_string =~ s/<pubDate>//g;
        $date_string =~ s/<\/pubDate>//g;
        chomp($date_string);
        print "Date:      $date_string\n";
        print "Posting:   ";
      }
      elsif(/<description>/../<\/description>/)
      {
        $whitespace = index $_, "<";
        $description_string = substr $_, $whitespace;
        $description_string =~ s/<description>//g;
        $description_string =~ s/<\/description>//g;
        chomp($description_string);
        print "$description_string";
      }
      elsif(/<category /../<\/category>/)
      {
        $temp = substr $_, 5;
        $end_tag = index $temp, "<";
        $begin_tag = index $temp, ">";
        $category_length = $end_tag - ($begin_tag + 1);
        $category_string = substr $temp, ($begin_tag + 1), $category_length; 
        print "\nCategory:  $category_string\n";
      }
      elsif(/<dc:creator>/../<\/dc:creator>/)
      {
        $whitespace = index $_, "<";
        $user_string = substr $_, $whitespace;
        $user_string =~ s/<dc:creator>//g;
        $user_string =~ s/<\/dc:creator>//g;
        chomp($user_string);
        print "User:      $user_string\n\n";
        print "----------------------------------------------\n\n";
      }
    }   
  }
}


In this first section I download the feed and save it as feed.txt
(the absolute paths are used on my member website)

Notice that I dropped to the system for wget...
I do much more shell scripting than I do perl so it was easier.

Here is the First Section:
#!/usr/bin/perl

$feed_link="http://forum.codecall.net/external.php?type=RSS2";

system("wget -q $feed_link -O /home/debtboy/cgi-bin/feed.txt");

$feed_file="/home/debtboy/cgi-bin/feed.txt";



In this second section, I open up the downloaded file
(in read mode) and set up a while loop to look for
particular RSS 2.0 tags. I match regular expressions
using the if control structure.
The outer if structure is used to separate the header
from the items by flagging when a <title> and <description> tags
have been processed, meaning that we have moved past the
header area and are now looking for <item> tags.
The inner if structures do the parsing and printing
to the output.


Here is the Second Section:

open(RSSFILE, "<", $feed_file);

$item_detect=0;
$header_title=0;
$header_desc=0;

while(<RSSFILE>)
{
  if($item_detect =~ /[01]/)
  {
    if(/<title>/../<\/title>/)
    {
      $whitespace = index $_, "<";
      $title_string = substr $_, $whitespace;
      $title_string =~ s/<title>//g;
      $title_string =~ s/<\/title>//g;
      chomp($title_string);
      print "\n\nRSS FEED:           $title_string\n";
      $header_title=1;
    }
    elsif(/<description>/../<\/description>/)
    {
      $whitespace = index $_, "<";
      $description_string = substr $_, $whitespace;
      $description_string =~ s/<description>//g;
      $description_string =~ s/<\/description>//g;
      chomp($description_string);
      print "FEED DESCRIPTION:   $description_string\n\n\n";
      $header_desc=1;
    }
    $item_detect = ($header_title + $header_desc);
  }
  else
  {
    if(/<item>/../<\/item>/)
    {
      if(/<title>/../<\/title>/)
      {
        $whitespace = index $_, "<";
        $title_string = substr $_, $whitespace;
        $title_string =~ s/<title>//g;
        $title_string =~ s/<\/title>//g;
        chomp($title_string);
        print "Title:     $title_string\n";
      }
      elsif(/<link>/../<\/link>/)
      {
        $whitespace = index $_, "<";
        $link_string = substr $_, $whitespace;
        $link_string =~ s/<link>//g;
        $link_string =~ s/<\/link>//g;
        chomp($link_string);
        print "URL Link:  $link_string\n";
      }
      elsif(/<pubDate>/../<\/pubDate>/)
      {
        $whitespace = index $_, "<";
        $date_string = substr $_, $whitespace;
        $date_string =~ s/<pubDate>//g;
        $date_string =~ s/<\/pubDate>//g;
        chomp($date_string);
        print "Date:      $date_string\n";
        print "Posting:   ";
      }
      elsif(/<description>/../<\/description>/)
      {
        $whitespace = index $_, "<";
        $description_string = substr $_, $whitespace;
        $description_string =~ s/<description>//g;
        $description_string =~ s/<\/description>//g;
        chomp($description_string);
        print "$description_string";
      }
      elsif(/<category /../<\/category>/)
      {
        $temp = substr $_, 5;
        $end_tag = index $temp, "<";
        $begin_tag = index $temp, ">";
        $category_length = $end_tag - ($begin_tag + 1);
        $category_string = substr $temp, ($begin_tag + 1), $category_length; 
        print "\nCategory:  $category_string\n";
      }
      elsif(/<dc:creator>/../<\/dc:creator>/)
      {
        $whitespace = index $_, "<";
        $user_string = substr $_, $whitespace;
        $user_string =~ s/<dc:creator>//g;
        $user_string =~ s/<\/dc:creator>//g;
        chomp($user_string);
        print "User:      $user_string\n\n";
        print "----------------------------------------------\n\n";
      }
    }   
  }
}

Here are 2 images of the output in my shell, which is only
a portion of the total output.

Posted Image


Posted Image

Here is the total output, copied and pasted from my terminal:

RSS FEED:           CodeCall Programming Forum
FEED DESCRIPTION:   Community for Programmers and Developers with experts in C++, C#, Visual Basic, Java, Javascript, CGI, HTML and More!


Title:     Writing Problem
URL Link:  http://forum.codecall.net/java-help/21502-writing-problem.html
Date:      Fri, 09 Oct 2009 21:30:05 GMT
Posting:   im working on a note project where u can write notes down etc. but im stucked because i dont know how to make the whole screen editable. anyone could help me please?
Category:  Java Help
User:      Flezria

----------------------------------------------

Title:     which language is the best match for my envisioned project
URL Link:  http://forum.codecall.net/general-programming/21501-language-best-match-my-envisioned-project.html
Date:      Fri, 09 Oct 2009 21:26:20 GMT
Posting:   <![CDATA[Hello,
Category:  General Programming
User:      Codix

----------------------------------------------

Title:     Multiple insertion with checkbox
URL Link:  http://forum.codecall.net/php-forum/21500-multiple-insertion-checkbox.html
Date:      Fri, 09 Oct 2009 20:35:09 GMT
Posting:   <![CDATA[I have a database table with program details. It has program ID (proid), program name (pronm) and others. I have selected all the row from the program table using a while loop and associated a checkbox with each program. The following is the code.<?php<form method=post action=rating_insert.php>";<table width=450 border=0 cellspacing=0 cellpadding=3>";<tr><td><input name=chck[] type=checkbox value=$rec_row[proid]/></td><td colspan=3>$rec_row[pronm]</td>";<td><input name=chck[] type=checkbox value=$rec_row[proid] /></td><td colspan=3>$rec_row[pronm]</td></tr>";<tr><td></td><td></td><td align=right><input name=submit type=submit value='Submit' /></td></tr>";</table>";</form>";
Category:  PHP Forum
User:      liri ayekpam

----------------------------------------------

Title:     wht to learn after HTML ?
URL Link:  http://forum.codecall.net/html-programming/21498-wht-learn-after-html.html
Date:      Fri, 09 Oct 2009 19:31:06 GMT
Posting:   what i have to learn after html ?
Category:  HTML Programming
User:      alexsmith

----------------------------------------------

Title:     Can you spot the error in this program?
URL Link:  http://forum.codecall.net/java-help/21497-can-you-spot-error-program.html
Date:      Fri, 09 Oct 2009 19:29:09 GMT
Posting:   <![CDATA[Hello,< car_list.length; k++)<carList.length;k++)< carList.length-1; k++)< carList[k+1].getModel())< carList.length-1; k++)< carList[k+1].getMileage())
Category:  Java Help
User:      heidi7

----------------------------------------------

Title:     Why do you program/Why are you learning to program?
URL Link:  http://forum.codecall.net/lounge/21496-why-do-you-program-why-you-learning-program.html
Date:      Fri, 09 Oct 2009 18:34:53 GMT
Posting:   <![CDATA[Hi,
Category:  The Lounge
User:      taylerhughes

----------------------------------------------

Title:     NEED HELP!!!
URL Link:  http://forum.codecall.net/java-help/21495-need-help.html
Date:      Fri, 09 Oct 2009 17:37:12 GMT
Posting:   Hello everyone, can someone help me with this please?
Category:  Java Help
User:      JackDaniels

----------------------------------------------

Title:     how to learn SSL !
URL Link:  http://forum.codecall.net/general-programming/21494-how-learn-ssl.html
Date:      Fri, 09 Oct 2009 16:53:41 GMT
Posting:   hello . 
Category:  General Programming
User:      alexsmith

----------------------------------------------

Title:     what wrong
URL Link:  http://forum.codecall.net/perl/21492-what-wrong.html
Date:      Fri, 09 Oct 2009 16:14:04 GMT
Posting:   <![CDATA[<STDIN>);
Category:  Perl
User:      kiddies

----------------------------------------------

Title:     Four Word Game reader
URL Link:  http://forum.codecall.net/community-projects/21489-four-word-game-reader.html
Date:      Fri, 09 Oct 2009 15:20:57 GMT
Posting:   <![CDATA[I just made a small program I want to share with you :) The program will look for all posts in the new "Four Word Game" and put them together to a whole story. The program is written in python and here's the code :D :<div id="post_message_' + post + '">') <div id="post_message_' + post + '">'):content.index("</div>",Index)]<i>Posted via <a href="http://codecall.mobi" target="_blank">CodeCall Mobile</a></i>',"")
Category:  Community Projects
User:      Vswe

----------------------------------------------

Title:     C# Generate Fixtures
URL Link:  http://forum.codecall.net/c-programming/21488-c-generate-fixtures.html
Date:      Fri, 09 Oct 2009 14:43:51 GMT
Posting:   <![CDATA[Attached is a project that lets you control a sports league.
Category:  C# Programming
User:      matio

----------------------------------------------

Title:     <![CDATA[[C++][WinAPI] Exceptions & callback]]>
URL Link:  http://forum.codecall.net/c-c/21482-c-winapi-exceptions-callback.html
Date:      Fri, 09 Oct 2009 13:14:08 GMT
Posting:   <![CDATA[When i`m trying to throw an exception... :
Category:  C and C++
User:      winuser

----------------------------------------------

Title:     <![CDATA[[Help]WYSIWYG Editor[Help]]]>
URL Link:  http://forum.codecall.net/website-design/21481-help-wysiwyg-editor-help.html
Date:      Fri, 09 Oct 2009 13:02:36 GMT
Posting:   <![CDATA[Okay so i have downloaded a trial version of Adobe Dreamweaver so i can update my beta version of a text based game i am making due to the fact i am trying to make it unique as i am ok at making graphics.
Category:  Website Design
User:      Junes

----------------------------------------------

Title:     Development tools for linux.
URL Link:  http://forum.codecall.net/software-development-tools/21480-development-tools-linux.html
Date:      Fri, 09 Oct 2009 12:53:43 GMT
Posting:   Hi, im new to programing (still on algorithms and flowcharts part), my question is: Is there a version of Raptor flowchart for linux or a tool that resembles this same 1? i also work (study) with Editpad pro wich i found out that can be installed in Linux through Wine.
Category:  Software Development Tools
User:      Trigg3r

----------------------------------------------

Title:     internet speed test in mbps
URL Link:  http://forum.codecall.net/computer-hardware/21478-internet-speed-test-mbps.html
Date:      Fri, 09 Oct 2009 11:37:00 GMT
Posting:   i would like to test my internet speed in mbps,last week i test my internet speed here ip-details.com/internet-speed-test/, it shown in kbps i need the right website to test in mbps,please let me know if there is anything.
Category:  Computer Hardware
User:      johntaylor

----------------------------------------------

Please keep in mind that this Feed Reader was specifically designed
to demonstrate parsing of the CodeCall RSS 2.0 Feed on the front page.

NOTE:
There are perl modules which are designed to simplify this very process,
(see: cpan.org) but the original script was created as a CGI script
where I don't have control over the environment.

This was fun, I should do more perl scripting. :D
  • 0


#512461 Simple Spider for Link Validation

Posted by debtboy on 02 October 2009 - 10:42 PM

I've made a simple 2 part shell script.

The first part uses wget to extract url links
from the codecall index page. The tricky part was getting
the regular expressions correct as the file was filtered
through grep and gawk.

The second part also uses wget in spider mode as it
attempts to visit each link and report the result.

Here is the script:

Posted Image


Here the script is made executable and kicked off. :w00t:
(it took over a minute to complete)

Posted Image


Here is the link.txt file that the first part creates.
Be sure to glance at the index file source and see how
well the filters work.

http://codecall.net/index.html
http://forum.codecall.net
http://blog.codecall.net
http://codecall.net/component/ionfiles/
http://wiki.codecall.net
http://forum.codecall.net/tutorials/
http://codecall.net/resources.html
http://freelance.codecall.net
http://forum.codecall.net/tutorials/
http://forum.codecall.net
http://freelance.codecall.net
http://forum.codecall.net/register.php
http://forum.codecall.net/blog.php?b=440
http://forum.codecall.net/blog.php?b=440
http://forum.codecall.net/blog.php?b=438
http://forum.codecall.net/blog.php?b=438
http://forum.codecall.net/blog.php?b=437
http://forum.codecall.net/blog.php?b=437
http://forum.codecall.net/external.php?type=RSS2
http://twitter.com/CodeCall
http://www.facebook.com/people/Code-Call/1159055559
http://forum.codecall.net/showthread.php?t=21258
http://forum.codecall.net/showthread.php?t=21258
http://forum.codecall.net/showthread.php?t=21242
http://forum.codecall.net/showthread.php?t=21242
http://forum.codecall.net/showthread.php?t=21230
http://forum.codecall.net/showthread.php?t=21230
http://forum.codecall.net/showthread.php?t=21227
http://forum.codecall.net/forumdisplay.php?f=7
http://forum.codecall.net/showthread.php?t=21178
http://forum.codecall.net/forumdisplay.php?f=33
http://forum.codecall.net/showthread.php?t=21300
http://forum.codecall.net/forumdisplay.php?f=12
http://forum.codecall.net/showthread.php?t=21158
http://forum.codecall.net/forumdisplay.php?f=7
http://forum.codecall.net/showthread.php?t=21298
http://forum.codecall.net/forumdisplay.php?f=36
http://forum.codecall.net/showthread.php?t=21288
http://forum.codecall.net/forumdisplay.php?f=7
http://forum.codecall.net/showthread.php?t=21294
http://forum.codecall.net/forumdisplay.php?f=11
http://forum.codecall.net/showthread.php?t=21281
http://forum.codecall.net/forumdisplay.php?f=12
http://forum.codecall.net/showthread.php?t=21063
http://forum.codecall.net/forumdisplay.php?f=11
http://forum.codecall.net/showthread.php?t=19383
http://forum.codecall.net/forumdisplay.php?f=64
http://forum.codecall.net/showthread.php?t=21216
http://forum.codecall.net/forumdisplay.php?f=16
http://forum.codecall.net/showthread.php?t=21276
http://forum.codecall.net/forumdisplay.php?f=7
http://forum.codecall.net/showthread.php?t=21290
http://forum.codecall.net/forumdisplay.php?f=73
http://forum.codecall.net/showthread.php?t=556
http://forum.codecall.net/forumdisplay.php?f=31
http://forum.codecall.net/showthread.php?t=21285
http://forum.codecall.net/forumdisplay.php?f=36
http://forum.codecall.net/showthread.php?t=21299
http://forum.codecall.net/forumdisplay.php?f=7
http://forum.codecall.net/showthread.php?t=21297
http://forum.codecall.net/forumdisplay.php?f=11
http://forum.codecall.net/showthread.php?t=21289
http://forum.codecall.net/forumdisplay.php?f=11
http://forum.codecall.net/showthread.php?t=21246
http://forum.codecall.net/forumdisplay.php?f=89
http://forum.codecall.net/showthread.php?t=21224
http://forum.codecall.net/forumdisplay.php?f=16
http://forum.codecall.net/showthread.php?t=21217
http://forum.codecall.net/forumdisplay.php?f=10
http://forum.codecall.net/showthread.php?t=21189
http://forum.codecall.net/forumdisplay.php?f=99
http://forum.codecall.net/showthread.php?t=21191
http://forum.codecall.net/forumdisplay.php?f=31
http://forum.codecall.net/showthread.php?t=21170
http://forum.codecall.net/forumdisplay.php?f=124
http://forum.codecall.net/showthread.php?t=21165
http://forum.codecall.net/forumdisplay.php?f=11
http://forum.codecall.net/showthread.php?t=21156
http://forum.codecall.net/forumdisplay.php?f=26
http://forum.codecall.net/showthread.php?t=21138
http://forum.codecall.net/forumdisplay.php?f=99
http://forum.codecall.net/showthread.php?t=21091
http://forum.codecall.net/forumdisplay.php?f=99
http://forum.codecall.net/showthread.php?t=21080
http://forum.codecall.net/forumdisplay.php?f=10
http://forum.codecall.net/showthread.php?t=21047
http://forum.codecall.net/forumdisplay.php?f=124
http://forum.codecall.net/showthread.php?t=21300
http://forum.codecall.net/forumdisplay.php?f=12
http://forum.codecall.net/showthread.php?t=21299
http://forum.codecall.net/forumdisplay.php?f=7
http://forum.codecall.net/showthread.php?t=21298
http://forum.codecall.net/forumdisplay.php?f=36
http://forum.codecall.net/showthread.php?t=21297
http://forum.codecall.net/forumdisplay.php?f=11
http://forum.codecall.net/showthread.php?t=21294
http://forum.codecall.net/forumdisplay.php?f=11
http://forum.codecall.net/showthread.php?t=21290
http://forum.codecall.net/forumdisplay.php?f=73
http://forum.codecall.net/showthread.php?t=21289
http://forum.codecall.net/forumdisplay.php?f=11
http://forum.codecall.net/showthread.php?t=21288
http://forum.codecall.net/forumdisplay.php?f=7
http://forum.codecall.net/showthread.php?t=21285
http://forum.codecall.net/forumdisplay.php?f=36
http://forum.codecall.net/showthread.php?t=21281
http://forum.codecall.net/forumdisplay.php?f=12
http://forum.codecall.net/showthread.php?t=21280
http://forum.codecall.net/forumdisplay.php?f=7
http://forum.codecall.net/showthread.php?t=21279
http://forum.codecall.net/forumdisplay.php?f=102
http://forum.codecall.net/showthread.php?t=21278
http://forum.codecall.net/forumdisplay.php?f=103
http://forum.codecall.net/showthread.php?t=21276
http://forum.codecall.net/forumdisplay.php?f=7
http://forum.codecall.net/showthread.php?t=21275
http://forum.codecall.net/forumdisplay.php?f=13
http://forum.codecall.net/showthread.php?t=21295
http://forum.codecall.net/forumdisplay.php?f=41
http://forum.codecall.net/showthread.php?t=21256
http://forum.codecall.net/forumdisplay.php?f=41
http://forum.codecall.net/showthread.php?t=21241
http://forum.codecall.net/forumdisplay.php?f=41
http://forum.codecall.net/showthread.php?t=21201
http://forum.codecall.net/forumdisplay.php?f=41
http://forum.codecall.net/showthread.php?t=21200
http://forum.codecall.net/forumdisplay.php?f=100
http://forum.codecall.net/showthread.php?t=21159
http://forum.codecall.net/forumdisplay.php?f=41
http://forum.codecall.net/showthread.php?t=21076
http://forum.codecall.net/forumdisplay.php?f=100
http://forum.codecall.net/showthread.php?t=21073
http://forum.codecall.net/forumdisplay.php?f=100
http://forum.codecall.net/showthread.php?t=21077
http://forum.codecall.net/forumdisplay.php?f=41
http://forum.codecall.net/showthread.php?t=21062
http://forum.codecall.net/forumdisplay.php?f=41
http://forum.codecall.net/showthread.php?t=20998
http://forum.codecall.net/forumdisplay.php?f=41
http://forum.codecall.net/showthread.php?t=20992
http://forum.codecall.net/forumdisplay.php?f=100
http://forum.codecall.net/showthread.php?t=20968
http://forum.codecall.net/forumdisplay.php?f=100
http://forum.codecall.net/showthread.php?t=20932
http://forum.codecall.net/forumdisplay.php?f=41
http://forum.codecall.net/showthread.php?t=20861
http://forum.codecall.net/forumdisplay.php?f=100
http://forum.codecall.net/software-development/
http://forum.codecall.net/web-development-forum/
http://forum.codecall.net/website-promotion/
http://forum.codecall.net/community/
http://forum.codecall.net/general/
http://forum.codecall.net/tech-support/
http://software.codecall.net/audio_multimedia/
http://software.codecall.net/business/
http://software.codecall.net/communications/
http://software.codecall.net/desktop/
http://software.codecall.net/education/
http://software.codecall.net/games_entertainment/
http://software.codecall.net/graphics/
http://software.codecall.net/home_hobby/
http://software.codecall.net/network__internet/
http://software.codecall.net/security/
http://software.codecall.net/servers/
http://software.codecall.net/development/
http://software.codecall.net/system_utilities/
http://software.codecall.net/web_development/
http://software.codecall.net/unsorted/
http://www.webmarketingexperts.com.au
http://www.javaforstudents.co.uk/
http://www.algolist.net
http://www.asciibin.com
http://www.amphosted.com/billing/aff.php?aff=010
http://www.unseenbattle.com
http://freelance.codecall.net/item/viewitem/75
http://freelance.codecall.net/item/viewitem/75
http://freelance.codecall.net/item/viewitem/74
http://freelance.codecall.net/item/viewitem/74
http://freelance.codecall.net/item/viewitem/73
http://freelance.codecall.net/item/viewitem/73
http://freelance.codecall.net/post
http://freelance.codecall.net
http://www.codecall.net/
http://www.codecall.net/index.php?option=com_contact&view=category&catid=0
http://www.codecall.net/index.php?view=article&id=92&option=com_content&Itemid=135
http://software.codecall.net/
http://software.codecall.net/edit_program.html
http://www.webprofits.com.au/searchengineoptimisation.html
http://www.floristone.com/
http://codeconnect.net
http://www.freelancerstore.com
http://www.kfupm.edu.sa
http://www.ionicware.com
http://freelance.codecall.net
http://www.jordandelozier.com/
http://www.asciibin.com/
http://www.questionbin.com/
http://www.questionbin.com/debates.html


Now the only thing left to do spider the links
and report the results, which is exactly what
the second part of the script does.
In verbose mode it list 6 or 7 lines of data for
each link, so I'm only capturing the Resolving line
(the actual link) and the HTTP request sent line (the result).

Here is the link_result.txt file that the second part creates.
Resolving codecall.net... 199.71.213.27
HTTP request sent, awaiting response... 200 OK
Resolving forum.codecall.net... 199.71.213.27
HTTP request sent, awaiting response... 200 OK
Resolving blog.codecall.net... 199.71.213.27
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 200 OK
Resolving wiki.codecall.net... 199.71.213.27
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 200 OK
Resolving freelance.codecall.net... 199.71.213.27
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 200 OK
Resolving twitter.com... 168.143.161.20
HTTP request sent, awaiting response... 200 OK
Resolving www.facebook.com... 69.63.181.12
HTTP request sent, awaiting response... 302 Found
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 200 OK
Resolving software.codecall.net... 199.71.213.27
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 200 OK
Resolving www.webmarketingexperts.com.au... 125.214.72.59
HTTP request sent, awaiting response... 200 OK
Resolving www.javaforstudents.co.uk... 69.147.246.162
HTTP request sent, awaiting response... 200 OK
Resolving www.algolist.net... 174.132.156.99
HTTP request sent, awaiting response... 200 OK
Resolving www.asciibin.com... 199.71.214.230
HTTP request sent, awaiting response... 200 OK
Resolving www.amphosted.com... 67.220.197.212
HTTP request sent, awaiting response... 301 Moved Permanently
Resolving account.amphosted.com... 67.220.197.212
HTTP request sent, awaiting response... 302 Moved Temporarily
Resolving www.unseenbattle.com... 205.178.189.131
HTTP request sent, awaiting response... 301 Moved Permanently
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 200 OK
Resolving www.codecall.net... 199.71.213.27
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 200 OK
Resolving www.webprofits.com.au... 209.235.208.34
HTTP request sent, awaiting response... 200 OK
Resolving www.floristone.com... 204.15.131.12
HTTP request sent, awaiting response... 200 OK
Resolving codeconnect.net... 174.36.6.243
HTTP request sent, awaiting response... 200 OK
Resolving www.freelancerstore.com... 193.200.80.195
HTTP request sent, awaiting response... 200 OK
Resolving www.kfupm.edu.sa... 212.26.1.169
HTTP request sent, awaiting response... 200 OK
Resolving www.ionicware.com... 199.71.214.230
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 200 OK
Resolving www.jordandelozier.com... 199.71.214.230
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 200 OK
Resolving www.questionbin.com... 199.71.214.230
HTTP request sent, awaiting response... 200 OK
HTTP request sent, awaiting response... 200 OK

A simple way to verify your site links.

The script could be easily modified to descend through directories
and collect all links from the entire site or even multiple domains,
but (IMHO), you get a lot of functionality for only 2 lines of code.

If you haven't done any Shell Scripting,
give it a try, it's FUN. :D
  • 2


#511952 captcha web API

Posted by debtboy on 30 September 2009 - 05:54 PM

I know how everyone here loves APIs :bad:,
but I came across a web based API, that could
be very useful in certain situations.

A captcha - (login, designed to prevent automated spam
by offering a human readable image pattern which needs to
be keyed in for access).

This captcha API is made available with only a few lines of code.
I tried it, and it worked exactly as expected.

Here is the sample script:
<?
session_start();
// You need a unique string that identifies the user. The easiest way is to
// simply use the session ID. But because sending session IDs to other servers
// can be a security problem, we use only a part of the session ID here.
// This is still a quasi-unique string, so it works just as well.
$captcha_id = substr(session_id(), 0, 15); // first 15 characters of the session ID
?>

<html><head></head><body>
<img src="http://captchator.com/captcha/image/<?= $captcha_id ?>" />
<br />
Please enter the text from the picture:
<form action="test.php" method="post">
<input type="text" name="captcha_answer" />
<input type="submit" name="submit" value="Check" />
</form>

<?
if ($_POST['captcha_answer']) {
  // remove anything except letters and numbers (security)
  $answer = preg_replace('/[^a-z0-9]+/i', '', $_POST['captcha_answer']);
  // check answer
  // if you get an error message because your provider has diabled allow_url_fopen,
  // please use the myfile() function from the following website instead of file():
  // http://www.klamm.de/crashforum/showpost.php?p=1041750&postcount=5
  if (implode(file("http://captchator.com/captcha/check_answer/".$captcha_id."/".$answer)) == '1') {
    echo '<div style="color: green">Answer correct!</div>';
  } else {
    echo '<div style="color: red">Wrong answer, please try again.</div>';
  }
}
?>

<p>
See the <a href="test.php.txt">source code</a> of this script.
</p>

</body></html>

Here is the sample script loaded:

Posted Image




This is after I entered the proper code:

Posted Image




This is after I entered an improper code:

Posted Image



No difficult code here, just a simple API which is easily incorporated.

Not for everyone, but in the right situation, it could be very helpful
in the never ending fight against spam prevention.


References:
Captchator - Captcha service for PHP, Ruby on Rails, Python, ...
  • 3


#511322 Automated file upload using asp

Posted by debtboy on 28 September 2009 - 04:14 AM

Here is your solution in ASP.NET
made w/ Visual Studio. It would have
to be transferred (along with associated files
over to a virtual directory
in IIS on the SQL machine.

Imports System.web
Imports System.Data
Imports System.Data.SqlClient
Imports System.IO

        'DATA
        '**********
        Dim var_sqlconnection As New SqlConnection
        Dim var_sqldataadapter As New SqlDataAdapter
        Dim var_sqldataset As New DataSet
        Dim var_sqlselectcommand As New SqlCommand
        Dim var_sqlinsertcommand As New SqlCommand
        Dim var_sqldeletecommand As New SqlCommand
        Dim var_sqlcommandbuilder As New SqlCommandBuilder
        '**********

        Dim var_readline As String
        Dim var_sql As String
        Dim var_string As String


        Dim var_sqlconnectionstring As String = "data source=SERVER;initial catalog=DATABASE;persist security info=False;user " & _ 
                                                 "id=USER;password=PASSWORD;packet size=4096"

            var_streamreader = File.OpenText(var_file)

            Do
                var_readline = var_streamreader.ReadLine
                var_string = var_readline


                'IGNORE FIRST LINE, IF NECESSARY
                If (Mid(var_readline, 1, 3) <> "SOMETHING UNIQUE TO FIRST LINE") Then

                    Dim var_one As Integer
                    Dim var_two As Integer
                    Dim var_three As Integer
                    Dim var_four As Integer
                    Dim var_five As String
                    Dim var_count As Integer
                    Dim var_temp As String


                    '***EXTRACT VALUES FROM CSV ***
                    Try
                        'PAYRID
                        var_count = InStr(var_string, ",", CompareMethod.Text)
                        var_one = Mid(var_string, 1, (var_count - 1))
                        var_temp_string = Mid(var_string, (var_count + 1))
                        var_string = var_temp_string

                        var_count = InStr(var_string, ",", CompareMethod.Text)
                        var_two = Mid(var_string, 1, (var_count - 1))
                        var_temp_string = Mid(var_string, (var_count + 1))
                        var_string = var_temp_string

                        var_count = InStr(var_string, ",", CompareMethod.Text)
                        var_three = Mid(var_string, 1, (var_count - 1))
                        var_temp_string = Mid(var_string, (var_count + 1))
                        var_string = var_temp_string

                        var_count = InStr(var_string, ",", CompareMethod.Text)
                        var_four = Mid(var_string, 1, (var_count - 1))
                        var_temp_string = Mid(var_string, (var_count + 1))
                        var_string = var_temp_string

                        var_five = Mid(var_string, 1)


                    Catch ex As Exception
                        'ERROR CODE HERE ***
                    End Try


                    'UPLOAD TO DB ***
                    var_sql = ("INSERT INTO ROUTE_1 " & _
                                "VALUES(var_one, " & _
                                "var_two, " & _
                                "var_three, " & _
                                "var_four, " & _
                                "var_five)")

                    Try
                        var_sqlconnection.ConnectionString = var_sqlconnectionstring
                        var_sqlinsertcommand.CommandType = CommandType.Text
                        var_sqlinsertcommand.CommandText = var_sql
                        var_sqldataadapter.InsertCommand = var_sqlinsertcommand
                        var_sqldataadapter.InsertCommand.Connection = var_sqlconnection
                        var_sqldataadapter.InsertCommand.Connection.Open()
                        var_sqldataadapter.InsertCommand.ExecuteNonQuery()
                        var_sqldataadapter.InsertCommand.Connection.Close()


                    Catch Iex As Exception
                        'ERROR CODE HERE ***
                    End Try
                End If

            Loop Until (var_readline Is Nothing)

            var_streamreader.Close()
            var_streamreader.Dispose()



I had hoped to stay away from a solution such as this
as it requires Visual Studio and a understanding of
that whole process.
When you get this working, you need to create
a simple task to detect if the csv file has been transferred
and then to kick this program off.

BTW...
The "code behind" ASP.NET language
used was VB.

Any questions (I know you have some), let me know
and we can work through it.

Good Luck
  • -1


#509479 Database access using Python

Posted by debtboy on 19 September 2009 - 06:05 PM

Lately I've been writing Python scripts in an effort to better
understand the language. After completing this last one, I
decided to make a little tutorial out of it.

This script uses the dbapi2 of the pysqlite2 package, which is
basically just a wrapper around a sqlite database which simplifies
Python access.
A sqlite database is created and a fixed set of data is inserted into it,
then a query is executed with the result being printed to standard out.

Here is the complete script:
#!/bin/env python

from pysqlite2 import dbapi2

debtboy_connection = dbapi2.connect('linux.db')
debtboy_cursor = debtboy_connection.cursor()

debtboy_cursor.execute('''CREATE TABLE
                          release(distro VARCHAR(15),
                          version VARCHAR(5),
                          type VARCHAR(10))''')

debtboy_data = [
                 ('Gentoo', '2009', 'rolling'),
                 ('Arch', '2009', 'rolling'),
                 ('Slackware', '13.1', 'fixed'),
                 ('Fedora', '11.0', 'fixed'),
                 ('Debian', '5.0', 'fixed'),
                 ('Ubuntu', '9.04', 'fixed'),
                 ('openSUSE', '11.1', 'fixed'),
                 ('Mandriva', '2009', 'fixed'),
                 ('Mint', '7.0', 'fixed'),
                 ('PCLinuxOS', '2009', 'rolling'),
               ]
 
debtboy_cursor.executemany('''INSERT INTO 
                              release(distro, 
                              version,type) 
                              VALUES(?, ?, ?)''', debtboy_data)

debtboy_cursor.execute('''SELECT distro, 
                          version, 
                          type 
                          FROM release
                          ORDER BY distro''')

print 

column_width = 15

for column_description in debtboy_cursor.description:
   print column_description[0].ljust(column_width) ,
print

print '-' * 45

debtboy_index = range(len(debtboy_cursor.description))

for row in debtboy_cursor:
   for index in debtboy_index:
      debtboy_value = str(row[index])
      print debtboy_value.ljust(column_width) ,
   print

debtboy_connection.commit()
debtboy_connection.close()
print


This is the first section, it starts off with a she-bang #! :cool:
and following that is the Python interpreter.
Then the dbapi2 is imported from pysqlite2 so we can establish
a database connection (if the database were trying to connect
doesn't exist, then it will be created).
A db cursor is also created and used to make a table.
#!/bin/env python

from pysqlite2 import dbapi2

debtboy_connection = dbapi2.connect('linux.db')
debtboy_cursor = debtboy_connection.cursor()

debtboy_cursor.execute('''CREATE TABLE
                          release(distro VARCHAR(15),
                          version VARCHAR(5),
                          type VARCHAR(10))''')


Here is the fixed set of data (Linux distro names, versions and types).
3 string literals are each saved in a tuple and all the tuples are saved
in a list. This data is inserted into the database using the executemany
function which saves me from looping and inserting each row.
debtboy_data = [
                 ('Gentoo', '2009', 'rolling'),
                 ('Arch', '2009', 'rolling'),
                 ('Slackware', '13.1', 'fixed'),
                 ('Fedora', '11.0', 'fixed'),
                 ('Debian', '5.0', 'fixed'),
                 ('Ubuntu', '9.04', 'fixed'),
                 ('openSUSE', '11.1', 'fixed'),
                 ('Mandriva', '2009', 'fixed'),
                 ('Mint', '7.0', 'fixed'),
                 ('PCLinuxOS', '2009', 'rolling'),
               ]
 
debtboy_cursor.executemany('''INSERT INTO 
                              release(distro, 
                              version,type) 
                              VALUES(?, ?, ?)''', debtboy_data)



This last section executes a query selecting the data, which is
then looped through and displayed on standard out. You probably
noticed a number of stand alone "print" commands which were used
to format the data (adding a newline).
debtboy_cursor.execute('''SELECT distro, 
                          version, 
                          type 
                          FROM release
                          ORDER BY distro''')

print 

column_width = 15

for column_description in debtboy_cursor.description:
   print column_description[0].ljust(column_width) ,
print

print '-' * 45

debtboy_index = range(len(debtboy_cursor.description))

for row in debtboy_cursor:
   for index in debtboy_index:
      debtboy_value = str(row[index])
      print debtboy_value.ljust(column_width) ,
   print

debtboy_connection.commit()
debtboy_connection.close()
print

I chose to make this an executable script from the shell, so
here I am using chmod to make it executable.
I could have left it as a regular file and ran it from the Python
interpreter in which case the first line wouldn't be needed.
Posted Image


Here is the standard out result of the above query.
Posted Image

A simple script which demonstrates database access using Python. ;)
  • 2


#508936 she-bang #!

Posted by debtboy on 17 September 2009 - 03:23 PM

What is she-bang and why do we call it that??

What is she-bang?
she-bang or sh-bang are the first 2 characters of a line,
indicating to the OS that a command interpreter is needed.

These 2 characters make up a magic number, typically used in shell scripts
and some other programs that require a command interpreter. Immediately
following the she-bang is a path to the required interpreter.

The # character, which is normally used to denote comments, make the
she-bang line itself invisible to the interpreter.

Why do we call it that?
The # character is sometimes called sharp (sh-arp) or hash (ha-sh)
and the exclamation point is sometime called a bang for short. sh-bang or she-bang.

Typical usage:
#!/bin/bash or #!/bin/env bash

Most any shell and many interpreters can be called out this way.

Welcome to the world of Linux scripting :w00t:
  • 2


#508919 Need a query to do this:

Posted by debtboy on 17 September 2009 - 01:12 PM

The sort_order column is exactly what was needed
to distinguish between district and system, so only
3 views were needed.

I added a system entry because it has to exist (it has an ID)
If you find it in a different table other than Hierarchy, no problem
just join and extract the same way.
The project_level_id of 999 for system was made up.

Here is your Hierarchy Table:

Posted Image

Here is your Hierarchy_Relation Table:

Posted Image


This creates the section1 view (stores).
The section1 view is used as a key (kind of) because each store is unique.

Posted Image


Here is the section1 view that was generated:

Posted Image


This creates the section2 view (districts).
The sort_order is used here to distinguish between districts and systems.

Posted Image


Here is the section2 view that was generated, notice how it's keyed
back to hierarchy_id of section1 using the hierarchy_lower_level_id.

Posted Image


This creates the section3 view (systems).
Again sort_order is used.

Posted Image


Here is the section3 view that was generated, it is also keyed
back to hierarchy_id of section1 via the hierarchy_lower_level_id again.

Posted Image


Now it's just a matter of a select statement using the hierarchy_ids
of the stores as keys. The result is below the query.

Posted Image


This works no matter how many stores, districts or systems exist.
You will have to incorporate project tables and such.

Hope this was useful. :rolleyes:

Good Luck on your project!!
  • -1


#507873 Gopher... the path less taken

Posted by debtboy on 12 September 2009 - 10:27 AM

Posted Image
In context of the internet, gopher isn't someone who
gets coffee or a cute little rodent, it's a fully functional
TCP/IP protol (port 70) that was designed to distribute,
search, and retrieve documents over the internet.

Gopher was developed in 1991 at the University of Minnesota,
home of the "Golden Gophers", it's typically text based,
but there have been attempts to extend it's functionality,
most notebly the HyperGopher browser.

Some browsers (which I don't use) have dropped support for gopher
all together, such as Internet Explorer, Safari, Opera, Chrome, etc...
There have been rumors about Firefox dropping support, but time
will tell, I used Firefox 3.5.2 for all the images below.

For those of you familiar with Archie (FTP search) you can appreciate
the gopher search engine names Veronica and Jughead.
Posted Image


How do I access gopher?
To access a site using the gopher protocol, you simply call out the protocol
as part of the browser URL line.
gopher://gopher.floodgap.com/1/v2

Posted Image


How do I search?
You use a gopher search engine much the same way you use a
normal http search engine, however there are not many gopher
search engines around.
I typically use Veronica-2, see below...
Posted Image

And here is the result set I received in return.
Posted Image

Here is a document from one of the links I clicked:
Posted Image



Is there anything good out there?
For some, there is a wealth of information to be devoured using gopher,
but for others, especially those who only like flash and video may not find much to be had.
Did you know that many educational institutions still make files available via gopher?
Is there anything good out there?
You will have to decide that for yourself, but this portal will get you started
using gopher.
Posted Image

Posted Image

If you've never used gopher...
Give it a try ;)


References:
Gopher (protocol) - Wikipedia, the free encyclopedia
Veronica FAQ (Part 1 of 2)
  • 2


#506392 man, apropos and whatis

Posted by debtboy on 06 September 2009 - 08:45 AM

To finish up this tutorial, I'm adding a very brief description of the info command/documentation system mentioned above.

The info command/function displays documentation saved in the info format which is typically created from a
texinfo source (texinfo is a language) using the makeinfo command. texinfo was created to use a single document
for online as well as printed documentation.

The info command structure is as follows:

info <filename>

<filename> being the name of the info file (typically the name of a command)

info man

Posted Image

Posted Image

A wealth of information on the texinfo language and format is easily obtained via...

info texinfo

Posted Image

info, just like man, apropos and whatis are all great tools, let's make use of them.


References:
Using the Linux Info Command - To Get Info on a Linux Command | DataStronghold.com
info - Linux Command - Unix Command
  • 1


#506239 man, apropos and whatis

Posted by debtboy on 05 September 2009 - 01:59 PM

Thought I'd try my hand at a simple tutorial...

One of the most important features of any Linux System is the Manual, otherwise known as the Man Pages.
The Linux man pages is a project that documents the Linux Kernel and C Library interfaces employed by user programs.

It's broken down into the following sections:

1 General commands
2 System calls
3 C library functions
4 Special files (usually devices, those found in /dev) and drivers
5 File formats and conventions
6 Games and screensavers
7 Misc.
8 System Administration commands and daemons


All individual man pages follow a common layout:

NAME
The name of the command or function, with a one-line description of what it does.

SYNOPSIS
In the case of a command, you get a formal description of how to run it and what command line options it takes. For program functions, a list of the parameters the function takes and which header file contains its definition. For experienced users, this may be all the documentation they need.

DESCRIPTION
A textual description of the functioning of the command.

EXAMPLES
Some examples of common usage.

SEE ALSO
A list of related commands or functions.

Other sections may be present, but these are not well standardized across man pages. Common examples include: OPTIONS, EXIT STATUS, ENVIRONMENT, KNOWN BUGS, FILES, AUTHOR, REPORTING BUGS, HISTORY and COPYRIGHT.


When you run man, at the command line, the return is sent to standard out using "less" as the default browser. This is why it only displays a page worth of data and allows you to navigate through the rest of the output with the following:
<enter key> - increment line by line through output
<spacebar> - increment page by page
<q> - quit

In addition you will notice a number in parenthesis after the NAME like man(1), this number refers to the section mentioned above.

To use man, at the command prompt type:
man <command name>

<command name> being the exact name of the command/function, for example...

man man

Posted Image

Posted Image

(If I could only give one command to a Linux newbie, it would be: man man)



apropos (which is the same as man with the -k option (man -k)) searches through the man pages NAME and DESCRIPTION areas for occurrences of the keyword (pattern). This is especially useful when you can't remember the exact command name, but you know the partial name (NAME) or what it does (DESCRIPTION).

The apropos output is sent directly to standard output without the benefit of a default browser such as less or more, so if the output is more then one screen you might want to pipe the output into less or more for convenient browsing.

To use apropos, at the command prompt type:
apropos <keyword>

<keyword> being the name, partial name or partial description, for example...

apropos manual
or
apropos manual | less

Posted Image

The apropos command returns information from the whatis database, which is basically a database containing a command name and a one-line description which matches the NAME section of the Man Pages. This database is also used below with the whatis command.

whatis is another piece in this documentation puzzle. Most descriptions say it searches the whatis database for a matching complete keyword. Basically, I think of it as a man page summary.

whatis <keyword>

<keyword> being the exact command name/function, for example...

whatis man
(the most perfect thing ever made, Ha! Ha! Ha! :lol: --sorry :o)

Posted Image

These 3 commands (man, apropos and whatis) can help a new, as well as experienced, Linux user through most any command line problems that arise.
In addition to these 3 commands, there is an alternate help system for the Linux user called... info, but that system is beyond the scope of this tutorial.

Experiment with man, apropos and whatis as they are useful tools when navigating the command line. ;)



References:
Man page - Wikipedia, the free encyclopedia
Linux man-pages home
apropos - Linux
makewhatis(8): Create whatis database - Linux man page
Linux MAN Pages - Linux Documentation with Search
The GNU info Command
  • 2


#505988 Detect Character Set

Posted by debtboy on 04 September 2009 - 12:24 PM

That's a really good question,
Linux systems seem to know what file type
and char set automatically.

I certainly don't know, but found this link
Tux Love: Hidden Linux : File mysteries

very interesting... :rolleyes:
  • 1




Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download