War Room

Go Back   WarriorForum - Internet Marketing Forums > The Warrior Forum > Main Internet Marketing Discussion Forum
Register Blogs FAQ Community CalendarHelp Desk

Ads By Warrior Forum
Reply
 
LinkBack Thread Tools
Old 12-23-2008, 10:40 AM   #1
PHP Programmer
 
Join Date: Apr 2007
Location: Chennai, Tamil Nadu, India.
Posts: 347
Thanks: 2
Thanked 0 Times in 0 Posts
Default Article Marketers - Spun Article Checker Script

Hi Warriors,

For those of you who spin articles, it can be a total pain to correct articles when you leave out a closing '}' or there is a stray '|' in between. I've attached a script which allows you to check if an article has properly balanced opening and closing curly brackets.

Do not run this on your server.

Rename the file to tester.php. You have to install php in your computer and run it using command line. Copy this file to the directory containing the article text files and use the following syntax:

php tester.php filename.txt

If you see "perfect!" as the output - your article is perfectly balanced. If not, you will be given a list of lines where the starting brace is not closed or where there is a stray '|'.

Hope you find it useful.

Raja Sekharan
Attached Files
File Type: txt tester.txt (869 Bytes, 17 views)
Raja Sekharan is offline   Reply With Quote
Old 12-23-2008, 10:46 AM   #2
TheRichJerksNet
Guest
 
Posts: n/a
Default Re: Article Marketers - Spun Article Checker Script

This is the exact reason the system I use you do not have to type in any } - I personally like things more automative and when just clicking on a link adds the alternative for you it is a much better way to go...

Hope your file helps those that still do manually type in }

James
  Reply With Quote
Old 12-23-2008, 01:06 PM   #3
An Original Thinker
War Room Member
 
Glenn Leader's Avatar
 
Join Date: Aug 2004
Location: Where Original Ideas Meet Action.
Posts: 3,584
Blog Entries: 1
Thanks: 594
Thanked 213 Times in 145 Posts
Contact Info
Send a message via Skype™ to Glenn Leader
Default Re: Article Marketers - Spun Article Checker Script

Quote:
Originally Posted by TheRichJerksNet View Post
This is the exact reason the system I use you do not have to type in any } - I personally like things more automative and when just clicking on a link adds the alternative for you it is a much better way to go...

Hope your file helps those that still do manually type in }

James

Same here. I just highlight and click a button. Job done.

Glenn

Glenn Leader is offline   Reply With Quote
Old 05-30-2011, 09:42 PM   #4
Warrior Member
 
Join Date: May 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Re: Article Marketers - Spun Article Checker Script

Hi,

Thanks Raja, this was helpful. There was a small error in the code which I corrected (see comments in code).

Here's the script:

Code:
<?php

 = ;
// = ;

 = fopen(,"r");
 = array();
=0;
0 = 0;
while (!feof())
{
      = fgetc();
     ++;
     if ( == "|" && 0<=0)
     {
         
          echo "Unexpected |.";
           = array();
          break;   

     }

     if ( == "{")
     {
         array_push(,);
         0++; // = 1;
     }

     if ( == "}")
     {
        if (count() == 0)
        {
            print "Excess } at nn";
             = array();
            break;
        }
        0--; // = 0;
        array_pop();
     }

}
fclose();
if (count() == 0 )
echo "perfect!";

 = file_get_contents();

foreach ( as )
{
    echo substr(,,100)."nn";
}
?>
joetango is offline   Reply With Quote
Old 02-14-2012, 09:54 AM   #5
Senior Warrior Member
War Room Member
 
Join Date: May 2005
Location: , , .
Posts: 1,102
Thanks: 11
Thanked 36 Times in 22 Posts
Default Re: Article Marketers - Spun Article Checker Script

Or...you can just use:

Check Your Spintax

Will highlight the open and close brackets for you and also tell you where your mistake is.

Ben Shaffer

BenShaffer is online now   Reply With Quote
Old 02-14-2012, 10:09 AM   #6
Warrior Member
 
Join Date: Feb 2012
Posts: 20
Thanks: 0
Thanked 1 Time in 1 Post
Default Re: Article Marketers - Spun Article Checker Script

I always thought that most spinners these days have an auto syntax checker. I know TBS does and SpinnerChief too. I suppose there are a plethora of other products out there though, and I always love me a good PHP script.

Great share!
protectyoursales is online now   Reply With Quote
Old 02-14-2012, 10:14 AM   #7
Senior Warrior Member
War Room Member
 
Join Date: May 2005
Location: , , .
Posts: 1,102
Thanks: 11
Thanked 36 Times in 22 Posts
Default Re: Article Marketers - Spun Article Checker Script

The problem with the built in checkers I found was that it was hard to actually find your mistakes and debug them.
Especially when you are dealing with hundreds of articles like we are makes it far easier to be able to debug all in one place. Also, this deals with any type of spintax and (almost) unlimited nested levels.

B

BenShaffer is online now   Reply With Quote
Reply

  WarriorForum - Internet Marketing Forums > The Warrior Forum > Main Internet Marketing Discussion Forum

Tags
article, checker, marketers, script, spun


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -6. The time now is 10:51 AM.