PHP script modification for cms on zend framework

Closed - This job posting has been filled and work has been completed.
Web, Mobile & Software Dev Scripts & Utilities Posted 2 years ago

Fixed Price

Delivery by April 13, 2013

$20.00

Budget

Details

Custom made CMS running on PHP and Zend framework. The script is taking a tag from the database and converting it into php code. It currently works but is taking too much time and slowing the system down.

DETAILS:

The tags are:

<INCLUDEFILE-X-serverpath/file.php>

Where X is the number of a unique INCLUDEFILE, there are multiple include files in the code.

The code is:

for($i=1; $i <= 9; $i++){
$ipos1 = strpos($html, 'INCLUDEFILE'.$i.'-');
$ipos2 = strpos($html, '>', $ipos1 + 13);
$includefile = substr($html, $ipos1 + 13, ($ipos2 - $ipos1 - 13));

if (is_file($includefile)) {
ob_start();
include $includefile;
$icontents = ob_get_contents();
ob_end_clean();
}else{
$icontents = '';
}
$html = str_replace('<INCLUDEFILE'.$i.'-'.$includefile.'>', $icontents, $html);
}

DESIRED RESULT:

Need to change the code to a more efficient and faster method as this code is causing pages to be rendered very slowly.


About the Client

(5.00) 11 reviews

United Kingdom
London 06:27 PM

22 Jobs Posted
73% Hire Rate, 1 Open Job

$2,600 Total Spent
18 Hires, 1 Active

$13.14/hr Avg Hourly Rate Paid
172 Hours

Member Since Apr 7, 2010