11-08-2007, 11:53 PM
|
#1 (permalink)
|
|
The Frequenter
Join Date: Sep 2007
Posts: 360
Thanks: 24
|
URL to Match
I want to match this:
Code:
<i>-- http://www.<b>google</b>.<b>com</b>/ <a href="http://dmoz.org/Computers/Internet/Searching/Search_Engines/Google/">Computers: Internet: Searching: Search Engines: Google</a></i>
Through the domain part: http://www.<b>google</b>.<b>com</b>/ and get back the following part:
Code:
<a href="http://dmoz.org/Computers/Internet/Searching/Search_Engines/Google/">Computers: Internet: Searching: Search Engines: Google</a>
Currently using the following in my function:
Where $szSiteName == 'google'
PHP Code:
$szURLToMatch = 'http:\/\/www.\<b\>' . $szSiteName . '\<\/b\>.\<b\>com\<\/b\>'; preg_match("/\<i\>-- $szURLToMatch\/ (.*?) \<\/i\>/", $szGetContents, $aMatches);
But the array returns no match.
Whole code: http://talkphp.pastebin.com/d10b3a5e3
Last edited by Haris : 11-09-2007 at 12:27 AM.
|
|
|
|