How to execute text as PHP

execute, php, scripting

Solution

eval(file_get_contents('yourfile.txt'));

BE CAREFUL!

http://php.net/manual/en/function.file-get-contents.php

http://php.net/manual/en/function.eval.php

Problem

I have a problem, I want to grab text and execute text as PHP, but how do I do this? For example I have this code in a .txt file: ``` $tweetcpitems->post('statuses/update', array('status' => wordFilter("The item Blue has been released on Club Penguin."))); $tweetcpitems->post('statuses/update', array('status' => wordFilter("The item Green has been released on Club Penguin."))); ``` Now the problem is that I grabbed this text and I want to execute it as a PHP script, how do I do this? Please help!

Original source