Confirmation Email for publishing pdf [closed] - php

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I have a question about developing a webapi. I want to send someone an email with an confirmation Link and If he clicks on it he should be redirected to a thanks page and get a second email with a pdf.
Unfortunatly I have no idea how to create the confirmation link. I can use every web language as php and node js.

One way to do this is to generate a long and random id and then pass that id as a url parameter.
var key = '25f56c64ee724e15b1b83688e9785a38'; /* Generated Key. */
var link = `https://some-url.com/example/${key}`;
In your database you would have a lookup table that maps the key to the userId.
The route for /example/{key} would then perform a fetch of the user information and generate the page and could also send the email with the pdf.
Note that the security here is is based on the randomness and length of your key. Adding an expiration would be good practice.

Related

How to send an sms comfirmation for when user sign up [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I'm creating a website that requires user to sign up in order to get an account.I was just wondering, what type of api/code/etc do I need to use to send a verification code to directly to their phones.Once they receive the message they should be able to send like a text to that number (ex: send yes to confirm to the number #987) and the account automatically gets confirm from the text message.
Here you've got a list of SMS APIs: http://blog.mashape.com/list-of-50-sms-apis/. It's from 2013 though, some of them might have changed. You do have free APIs like http://textbelt.com/ but it depends on where do you want to send those SMSem, different providers in different countries have different gateways. I think it's impossible to answer you in 1 sentence.

I want to create a website for polls/survey like this http://www.poll-maker.com/ [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
but did not understand
The concept of generating a link &
more importantly how they save the data in database,do they save it like id of poll & yes/no click or done with other logic.
what will happen to the polls which are expired? will they remain in database or somewhere else?
please help
To handle URL you can use cURL.
But I have an easy method. You can use the concept of Query Strings.
To Create New Question
Store the new question in database.Give Each Question a unique ID.
Then After user submits the questions show him a link like:
http://do-survey.com?question=xzxsa
To store polls
Get question like:
if(isset($_GET['question']))
{
$question = $_GET['question'];
// Now you have the question unique id manipulate the database using this
}
this is not the place to ask such questions, but to make my answer at least remotely useful:
they're not generating a link. That link doesn't exist under the form of a file on the server. Take for example a database containing 'id' 'poll' 'var1' 'var2'.
You can make a php page that gets a param from the link, have it like mysite.com/poll?id=1
The php script will get the '1' as a param, then you SELECT * FROM table WHERE id=1 and you generate the contents via php with the data from the DB.

How to generate a new PHP file with PHP [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Can anyone tell me how to Dynamically generate a new php file? Like generate it and then set it's code. Say that there was a user who created an account. When he created that account I would like it to generate his profile page.
Thanks!
You can do this using file_put_contents, but it's bad practice. It's much easier/better to just have one PHP file, profile.php for example, which takes a GET parameter for the user ID, then dynamically displays the correct information based on the user ID.

How to send session information in an HTML email [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
With PHP, I want to send a link into my clients' email so they can have access to a page on my website. This page will not be accessed by other users. So I plan to include some session information in the mail function.
I don't know how to go about it. Please kindly assist.
You can't send session info through to the email, but I would recommend creating a special token that is stored in your database. You can generate the link in the email to include that special token, then validate against it to ensure they are who they say they are.

MongoDB PHP email unique [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I have a beta signup form, I need to know how do I check to make sure the email address is not already in the database, and if it is not add it, if it is return a message.
I am hoping I don't have to do a find and then an if and then an insert, but something tells me I will have to.
You can create a unique index on email and then perform an insert in safe mode. If email is taken, you'll get an error. You won't get this error if there's no unique index or operation is not in safe mode.
I personally would do a simple find. For example, on this signup form when user entered his email and moves to the next field, I'd fire a quick ajax request to the server and find out if this email is taken or not and display result of this check in the form. This, of course, does not replace the need for unique index and safe mode (google race conditions).

Categories