₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,326,395 members, 8,426,313 topics. Date: Sunday, 14 June 2026 at 04:44 AM

Toggle theme

Php Quiz: Evalute Php Script - Webmasters - Nairaland

Nairaland ForumScience/TechnologyWebmastersPhp Quiz: Evalute Php Script (1407 Views)

1 Reply

Php Quiz: Evalute Php Script by Nobody: 10:56pm On Aug 25, 2011
Let us take a look at the code below string below:

<?php
$str='
This is nairaland and today is <?php echo date("m/d/y"wink;?>
I will like to visit facebook ahora. Meanwhile the current time stamp is <?php echo time();?>
';
?>
Now, let us assume you have string containing allow those jargons. What is the fastest way
to parse it to get the pure html output.
Re: Php Quiz: Evalute Php Script by sisqology(m): 5:43am On Aug 26, 2011
*dhtml:
Let us take a look at the code below string below:

Quote
<?php
$str='
This is nairaland and today is <?php echo date("m/d/y"wink;?>
I will like to visit facebook ahora. Meanwhile the current time stamp is <?php echo time();?>
';
?>

Now, let us assume you have string containing allow those jargons. What is the fastest way
to parse it to get the pure html output.
<?php
$str='
This is nairaland and today is '
$msg=
'I will like to visit facebook ahora. Meanwhile the current time stamp is ';
?>
<?php echo $str;
echo date('J F Y');
echo $msg;
echo date('H:i:s');
?>
Re: Php Quiz: Evalute Php Script by Nobody: 5:47am On Aug 26, 2011
Nope, the solution is going to look like this:

<?php
eval("$str"wink;

//You might need to use ob_start and ob_get_contents
echo $output;
?>
I am just hinting that you will use the eval command.

Of course, so many PHP script tags might be used. Even if them be 1000, the solution should work.
1 Reply

Were To Get A Php Script That Will Be Like NairalandMost Confusing And Simple Maths QuizPhp/mysql. Does Every Php Script Need A Database?234

[Video] Yvs Image Gallery – Sql Injection Tutorial [/Video]My Blog Danaty.org Has Been Hacked. That I have been killing Muslims in Nigeria6 Reasons Why You Should Quit Blogging