Webmaster Forum

Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.

Thread Tools Display Modes
Share |
Old 04-26-2011, 09:02 AM
davelev davelev is offline
Contributing Member
Join Date: 10-29-10
Posts: 539
iTrader: 0 / 0%
Need Script that Counts Links/Page

Hi There,

I am looking for a script that counts the number of outgoing links per page in a directory.
Will have 500 + pages, sometimes new links will be added, old ones removed, so I need a very good reliable script that counts per page.

I was looking on Google, but could not find anything Except counters for other reasons...

Probably a PHP or PERL script is required, but I don't know how complex it should be...

I need a script:

-that counts the number of links on each .htm page separately
-then delivers the results to a main "mother page"
-only counts outgoing links
-...and only those outgoing links that are listed in the directory, not including affiliate banners, not including other outgoing links, e.g. non-directory outgoing links...

Would be great if the script could make a "sum" by calculating all the links in the directory and displaying a total as well...

I need the number of listings to appear in the directory index, like:

>Business 2 Business Services (60)
>Business Magazines (12)
>Courses in Management (24)
>Marketing Services (89)

... bla bla...

And only for me, there should be a 'secret' display page that shows me the total for all, eg: TOTAL LINKS IN DIRECTORY = 12.548 and it updates all the time when I add or remove...

I was thinking that each link could get the same invisible "id" or something that the script can identify and count on each page...

Any ideas on how to do this kind of stuff?
Reply With Quote



Old 04-26-2011, 09:20 PM
lordspace's Avatar
lordspace lordspace is offline
Contributing Member
Join Date: 05-30-06
Location: Canada
Posts: 913
iTrader: 0 / 0%
it's definitely doable.
have you checked if there are any plugins for that directory software that do that.

I'd first add a class to banners and links that you don't want counted so the script can skip them easily.
Then I'd use a crawler script to parse and generate an HTML report.
/index.html : 5 internal; 14 outgoing links

I think there was a Firefox addon that was showing outgoing links.

It seems this web tool does that.
Reply With Quote
Old 04-27-2011, 04:13 AM
nemrod's Avatar
nemrod nemrod is offline
v7n Mentor
Join Date: 12-21-10
Location: Sweden
Posts: 463
iTrader: 0 / 0%
A simple PHP script that parses the DOM and only counts external links.

A software like that should be run on a database instead of static HTML files though, you should reconsider the way the site is built.
Reply With Quote
Old 04-28-2011, 03:35 AM
davelev davelev is offline
Contributing Member
Join Date: 10-29-10
Posts: 539
iTrader: 0 / 0%
I appreciate your help, but I think I'll need more details on how to do this exactly...
My pages are all simple .htm pages...
Reply With Quote
Old 04-28-2011, 03:43 AM
serena85 serena85 is offline
Contributing Member
Join Date: 04-19-11
Posts: 1,118
iTrader: 0 / 0%
I am curios also to see an answer whit a little example if possible pleas. Thanks in advance
Reply With Quote
Old 04-28-2011, 06:09 AM
abhiamke abhiamke is offline
Join Date: 04-16-11
Posts: 29
iTrader: 0 / 0%
ok your are problem will be solve then exactly what can you do? so describes the problem exactly. .
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
When Google counts backlinks, is it to a page or to an entire website? webbington Google Forum 14 04-16-2011 10:30 AM
Does forum signature links counts as Backlinks? vilelink SEO Forum 30 11-04-2010 10:48 AM
Question about counts of Adsense ads and links unit stbalaji2u Google Forum 4 11-11-2009 12:38 AM
Exchanging links: Main Page vs. Links page Rob Google Forum 22 01-09-2004 08:23 AM

V7N Network
Get exposure! V7N I Love Photography V7N SEO Blog V7N Directory

All times are GMT -7. The time now is 10:25 AM.
Powered by vBulletin
Copyright 2000-2014 Jelsoft Enterprises Limited.
Copyright © 2003 - 2018 VIX-WomensForum LLC