Creating a search and replace site...

2 replies
I have a product, The Wedding MC Jokebook. I would like to create a site or piece of software that allows the purchaser to enter a series of first names for Bride, Groom etc and then "replace" or generate the product with all of the names included in the product. So every joke reads with the wedding party's correct names in place etc.

I understand how to do it in Word etc. My product is a pdf. I wouldn't even mind a password site they can access with a form for name entry and then a "Submit" button.

If anyone knows how this might be done or someone who can do it please reply to the thread. I always learn a ton here.
#creating #replace #search #site
  • Profile picture of the author Daniel44
    I have seen this done and understand the theory behind it but I have never seen the code behind such a system. Basically you will want the "source" to originally be a html file with some tags where the names are supposed to go.

    You would then use file_get_contents() and str_replace() to insert the correct names and finally you would generate a pdf file: php pdf generation - Google Search
    {{ DiscussionBoard.errors[2620813].message }}
  • Profile picture of the author mywebwork
    Daniel has the right idea - you need to write a script (PHP or otherwise) that does a string replace. Have the output generate a PDF or a web page formatted for printing

    You might consider using a "spintax-like" format for the original text, similar to that used for article spinner software - that would make your replace operation pretty easy.

    Bill
    {{ DiscussionBoard.errors[2621067].message }}

Trending Topics