Jump to content

Create Variable Text?


Recommended Posts

Hello,

 

I am rather new to PHP, but quite familiar with HTML.

 

My question is, If I have a php file for example that looked like this:

 

<php
<variable text>
/php>

 

How could I create another PHP file with a simple form, that I can just type in my variable text and it will run the php script with the variable text in place.

 

Do you understand?

 

Thank's,

 

Tom Turner

Link to comment
Share on other sites

Really depends on how you want it to work. If you just wanted to run the users commands, you could use the eval() function on the string. If you wanted to save it for later, you could use fwrite()

 

Running user's commands is a very dangerous thing to do, however.

 

Perphaps if you told us a bit more about what you're trying to achieve, we could help more.

Link to comment
Share on other sites

Really depends on how you want it to work. If you just wanted to run the users commands, you could use the eval() function on the string. If you wanted to save it for later, you could use fwrite()

 

Running user's commands is a very dangerous thing to do, however.

 

Perphaps if you told us a bit more about what you're trying to achieve, we could help more.

 

Thank you.

 

There is a script in the internet that gathers various information about a target source, but requires you to open the script and change the url you are targetting, manually each time. So I wanted to find a way to simply enter the target url into a online form, rather than reupload the file each time :)

Link to comment
Share on other sites

Really depends on how you want it to work. If you just wanted to run the users commands, you could use the eval() function on the string. If you wanted to save it for later, you could use fwrite()

 

Running user's commands is a very dangerous thing to do, however.

 

Perphaps if you told us a bit more about what you're trying to achieve, we could help more.

 

Thank you.

 

There is a script in the internet that gathers various information about a target source, but requires you to open the script and change the url you are targetting, manually each time. So I wanted to find a way to simply enter the target url into a online form, rather than reupload the file each time :)

 

Why not just modify the script to take the url you are wanting to gather information for from the query string?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.