- substr: documentation ( source)
- strpos: documentation ( source)
- strrev: documentation ( source)
<?php
//$HOMEPAGE = FILE_GET_CONTENTS('WWW.ROGERS.COM');
$homepage = true;
if(!$homepage){
die("FILE_GET_CONTENTS_ERROR");
}
$rogers = "<a href=\"/business/BSS.portal?_nfpb=true&_st=&_windowLabel=header_portlet&_urlType=action&wlpheader_portlet_action=changeLanguage&lang=fr\">francais</a>";
$pos = strpos($rogers, "francais");
if($pos === FALSE){
die("STRPOS_ERROR");
}
$rogers = substr($rogers, 0, $pos);
if(!$rogers){
die("SUBSTR_ERROR");
}
echo($rogers);
echo("\n\r");
$revrogers = strrev($rogers);
echo($revrogers);