Re: PHP gurus...how are they doing this?

From: Date: Mon, 11 Oct 2004 18:13:50 +0000
Subject: Re: PHP gurus...how are they doing this?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-199222@lists.php.net to get a copy of this message
Mag wrote:
1.showing the number of "outgoing links"
Middle man. You have them click on a link containing an ID, increment the counter for that ID, then forward them to the requested link.
I'm not sure I understand what you mean here.
Actually, I misunderstood what you meant by outgoing links. You're looking for the number of links on the supplied page that go to another site, right (not tracking clicks through to the site)? And you're looking for the number of links going to a jpg or mpg? The only way I can imagine they are doing this is just loading the file into a string, like you are already doing, and parsing it with regular expressions. You'll just have to play around with your patterns until they work and realize you'll probably never be able to get it 100% correct with the variety of ways people code HTML out there. If you read the manual notes for the preg_* functions, there are a lot of examples given there on how to match/replace things like this. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com

« previous php.general (#199222) next »