Jump to content

How to make my random string end in .html (rephrased)


Xanco

Recommended Posts

Hello peoples.

 

You may of been my question before, regarding the same issue. I, however, cannot seem to make my string end in .html. Here's the code:

$file = md5( time().'' );

 

This does create a random sting, which I am using to generate links, like so: mywebsite.com/ffwjiafqoapwdlc. But I want it to end in .html: mywebsite.com/ffwjiafqoapwdlc.html. Is there anything I can do to get this result?

 

 - Thanks, Xanco

exeTrix gave you the answer in the other thread.

 

 

$fileName = md5( time() . ' some crazy string just to keep the hackers on their toes ' );

echo $fileName . '.html';

 

 

By the way, when you don't think you've gotten the answer you need, creating yet another thread is not the solution. Say that you don't understand and give people a chance to clarify. When you make a second thread it seems like you're just trying to ignore the people who were helping you before.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.