Jump to content

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


Xanco
Go to solution Solved by Mad programmer,

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

Link to comment
Share on other sites

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