Jump to content

Archived

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

Ninjakreborn

files again

Recommended Posts

Ok here is the process I have to follow
IPN "Instant Payment Notification" comes back from paypal.
It hits my ipn.php page.
I ahve already tested it out, that works

Now i need to
(ALL of this I have to do on ipn.php which is where paypal is sending back the information from.)
1. Database there user information, using there email address, and hashed password.
2. Withdraw there information from the database after entry, using there email address and hashed password.
(The purpose is so I can obtain the id number the db associated with the username.
3. Database the text they have typed out for there content in a cms table using the userid that was associated with them(for association purposes).
4. Create a directory using the person's chosen domain name.
4. Based on what template they have chosen(currently template1.php or template2.php), open that specific file, and save the contents of the file to a variable.
5. Examine the contents of that variable, and locate the area that is labeled <div class="content">
6. Add the following information underneat that line of code within the variable information I have extracted from the file.
[code]<?php
$select = "SELECT * FROM cms WHERE userid = '$id';";
$query = mysql_query($select);
if ($row = mysql_fetch_array($query)) {
// Display the content they ahd in the database out within the page here
}
?>[/code]
7. Take the new variable containing the alterations that were made(the data insertion), and save it to the directory I had chosen for them, using the name "index.php".
8. Close the mysql connection, do garbage collection, and whatever else is needed(no telling how many requests might hit this page at one time).

Now that is the process I have come up with, I have gotten help for a few pieces, like opening the file, resaving the file, copying it to another file, creating a directory, ex-cetera.
There are a few things I am having trouble planning out before I start.
I already set up the sub-domain script itself that he wanted, and it works, so that is taken care of, and the paypal, and ipn integration is already totally complete.  All I have to do now get the rest of what I listed finished.  I have been planning this a little at a time, and keeping him updated on the progress.
Now I have to ask for one more bit of advice, and this is the last thread I will open, I will keep using this one for the rest of my questions on this project, since I got all the information together, and put down full details about what I was doing.

Ok I need to figure out how to get the ID number of the user within the file information.  I have seen how to insert the information, if I just pass the id to it, will it automatically dynamically put it within the file, as needed or will that be a problem.

Once I write out a portion of the code, or write everything out and start testing, this will be the same thread I use if I run into problems or something, so I don't keep opening threads, adn so the full explanation is right here.

Share this post


Link to post
Share on other sites

×

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.