FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » This is a total php newbie question
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: This is a total php newbie question [message #175629 is a reply to message #175627] Fri, 14 October 2011 00:58 Go to previous messageGo to previous message
justaguy is currently offline  justaguy
Messages: 16
Registered: December 2010
Karma:
Junior Member
Sorry, Jerry, you missed my question.

Send the form to PayPay is to interface with PayPal's API
with the form's ACTION line.
And since it's an API, PayPal has a way to let the user click on
"Return to bla bla".

In essence, the task will accomplish two things:
A) link the user/buyer to PayPal to make a payment
B) back to my site with a special URL that give the buyer the info
including the software download link (but this link would expire in 24
hours).

Absolutely no need whatsoever with a database for this, it would be
totally overkill.

Don

> On Oct 13, 8:17 pm, Jerry Stuckle <jstuck...@attglobal.net> wrote:
> On 10/13/2011 6:29 PM, justaguy wrote:
>
>
>
>> Hi,
>
>> I sort of touched php at a very beginner's level a while ago...
>
>> Here' what I intended to do with some php scripts.
>> Business wise,
>> b1: take the user to PayPal to make a payment.
>
> OK
>
>> b2. take the user back from PayPal to download a program.
>
> You can't "take the user back".  All you can do is send them to a site.
>   Once they're gone, they're out of your control.  It's up to PayPal to
> send them back (which the user may or may not do).
>
>> Technically with php.
>> Have a base php script that performs the following task:
>> Send a form to PayPal
>
> Are you going to send them to PayPal or send a form to PayPal?  The two
> are entirely different.
>
>> The Action line is tricky...
>
>> Another php script addresses the PayPal's Return link.
>> it  does two things:
>> a) create another php script on the fly.
>
> Don't even think of this.
>
>> In it, it embed a link with a parameter.
>
> No problem.
>
>> b) it expires in 24 hours (remove the current context of the php file
>> or replace it with the following statement:
>> "The link has expired.  Please contact i...@knowledgenotebook.com for
>> assistance."
>
> Easy enough to do even without creating a script on the fly.  That's
> what databases are good for.
>
>> Next.
>
>> 1) how to create a php file on the fly?
>> With the content in the following 2)
>
> As I said before - don't even try. Use a database.
>
> <snip>
>
>> 2) How to set the link var, note var and display them
>
>> <?php
>>   $link = "http://bla.bla.bal/myProgram.exe";
>
> If you want people to subscribe to something, don't let them link to it
> directly.  Otherwise anyone will be able to download it just by knowing
> the location.  Rather, place the file outside of your website's document
> root and serve it with PHP (after validating people's information).
>
>
>
>> $note = "Please go to the Knowledge NoteBook website's Download page
>> for Installation Instructions,
>
>> $date1 = new DateTime("now");
>> $date2 = new DateTime("tomorrow");
>> $interval = date_diff($date1, $date2);
>
>> if ($interval)>  0
>> {
>>   $link = "";
>>   $note = "Sorry, the link has expired.  Please contact
>> i...@knowledgenotebook.com for assistance.";
>> }
>
>> <? print($link); ?>
>> <? print($note); ?>
>
>> ?>
>
> Again, use a database.
>
>> 3) How to expire or change its content?
>> Sort of, resolved.
>
> Once again, use a database.
>
> --
> ==================
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstuck...@attglobal.net
> ==================
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Mass Twitter Account Creator (PHP)
Next Topic: declaring private variable in class
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Nov 27 07:24:43 GMT 2024

Total time taken to generate the page: 0.04367 seconds