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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux