#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Posts
    4
    Rep Power
    0
    Is it possible to code a PHP script that will get the balance of a PayPal account and display it in a different web site? This is necessary for a setting in which the moneys donated to a certain account should be visible, real time.
    Thanks for taking the time.
    PS: if PHP doesn't work, what can?

    Oktay
  2. #2
  3. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    >>that will get the balance of a PayPal account

    What is PayPal account? How do you interact with it?

    >>display it in a different web site?

    Note, display it in a different site doesn't make it real time. By all means, it can't be displayed without someone visiting your other site. When someone visits your other site, it displays the up-to-second balance is called real time.
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Posts
    4
    Rep Power
    0
    Hello,

    Thanks for replying. What I mean with 'display at another site' is displaying it in a site other than PayPal's. Of course someone will visit my site and the script will fetch the balance off of PayPal. I need something like the scripts that fetch Slashdot, Linux Today etc. headlines, but the problem is I don't really know how PayPal handles displaying the balance since it is using its own script which is not visible in the source.

    By the way, PayPal is a free service that allows users to beam money to e-mail addresses (of other PayPal members naturally).

    Thanks a lot
  6. #4
  7. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    >>PayPal handles displaying the balance since it is using its own script

    That is fine. You are trying to fetch the html output of PayPal site for your account, right?
    Have you tried to use "fopen" to fetch the document by URL?
    Well, if a login is required and the output should be displayed by a POST method, you are probably out of luck using PHP.

    Let say you are to fetch linuxtoday headlines, then you can preform such task with GET method. PHP's fopen can do such task.

    If a login is required either via a form post or htaccess prompt, you then have to use Perl modules. Go to http://www.perl.com/CPAN-local/modules/by-module/LWP/ and get libwww-perl-5.48.tar.gz

    Here is an example -> http://www.devshed.com/Talk/Forums/F...ML/000182.html
    Of course, to grab a particular line of a page, you need to do some filtering.
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Posts
    4
    Rep Power
    0
    Yes, a password IS involved. I will look into the perl link.

    Thanks.
    Oktay
  10. #6
  11. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    >>Yes, a password IS involved. I will look into the perl link.

    To be more specific, you should take a look at HTTP/Request/Common.pm starting from line 224.

    libwww-perl package was meant to do advance tasks which PHP can't do presently. This is PHP forum, so I don't want to continue further. Just use the right tool for the right task and good luck.
  12. #7
  13. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Posts
    4
    Rep Power
    0
    I 'will' look into it, but I don't think it will work because the server requires the user to have cookies enabled and the cookie is meant to identify the owner of the account. Even if I could manage to have the cookie set on the user's machine, then he/she would be able to access my account since he/she will be having the cookie. Also the link is 'https' , I don't know how that effects things. Thanks a lot for everything. I will probably have a hard coded thing which I will update frequently.

    Thanks again.
    Oktay

Similar Threads

  1. Replies: 2
    Last Post: August 18th, 2004, 10:45 PM
  2. Replies: 9
    Last Post: January 29th, 2004, 07:33 AM
  3. PHP with UnixODBC
    By coder4hire in forum PHP Development
    Replies: 2
    Last Post: January 20th, 2004, 01:14 PM
  4. UnixODBC + PHP + Apache + Empress
    By coder4hire in forum Database Management
    Replies: 0
    Last Post: January 15th, 2004, 01:41 PM
  5. PayPal & PHP?
    By Crabby in forum PHP Development
    Replies: 1
    Last Post: January 11th, 2004, 12:26 AM

IMN logo majestic logo threadwatch logo seochat tools logo