1

I have a PHP script that is encrypted with Ion Cube. Since I don't want to violate the license, I can't modify anything in the script. The script makes calls to an XML based config file. I want to create a database to store the config data and then feed it to the encrypted script based on the referer URL that made the request. Basically, I want to "virtualize" the config XML file so I can feed the encrypted script the data I want based on the referer URL.

Any ideas?

jakub.g
  • 38,512
  • 12
  • 92
  • 130
  • How exactly do you interact with the script? Do you pass the config file name, or it is fixed within the script? Provide some basic code. – jakub.g Oct 02 '11 at 13:41
  • Can you configure the path of the XML file? If yes, you might be able to create your own file protocol that fetches the data from the database – Pekka Oct 02 '11 at 13:42

1 Answers1

0

You can use LD_PRELOAD and a custom library to override the php interpreter's file open of the config file and so switch it to open a different config file on demand.

xtopher
  • 406
  • 3
  • 9