02-17-2008, 01:16 AM
|
#5 (permalink)
|
|
La Vida es Sueño
Join Date: Sep 2007
Location: Oldham
Posts: 2,280
Thanks: 90
|
Thank you  ! You could port it over to PHP 4, although such functions as get_header are not available in PHP 4, though there are ways around that by using cURL.
Owen: Help yourself! Give TalkPHP a little mention though when you can please!
I modified the setAddress function earlier. Merely to ensure it can always extract the ID where available. Whereas the previous version, if there's any data trailing the YouTube ID, then it wouldn't work correctly.
php Code:
public function setAddress ($szIdentifier){ if(! preg_match('~^[a-z]+$~', $szIdentifier)) { preg_match('~.+?v=(?P<identifier>[^&]+).*~i', $szIdentifier, $aMatches); $szIdentifier = $aMatches[ 'identifier']; } $this-> m_szIdentifier = $szIdentifier; return true; }
__________________
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.
|
|
|