Bitcoin Forum
December 03, 2016, 09:55:18 PM *
News: To be able to use the next phase of the beta forum software, please ensure that your email address is correct/functional.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: .80 to whoever can help me figure this out. (Deposits w/ PHP)  (Read 973 times)
wildboy211
Sr. Member
****
Offline Offline

Activity: 294


View Profile
September 14, 2011, 06:35:08 AM
 #1

The problem:
Users need to deposit money on my site, im using bitcoinnotify.com and when users send money to one of my addresses, bitcoinnotify sends a HTTP POST to my url with deposit information. I created a simple page just to see what information bitcoinnotify.com was sending me, and all im getting is blank pages. The code im using is:
<?
print_r($_POST);
?>

Ive also created a "test" page and created a POST form and sent it to the deposit page, which showed the information.

What i need:
I dont specifically need to use bitcoinnotify.com and if there is a easier way, then i would use that. Ill pay for whoever figure out how i can get deposits and my server recognizes it so it shows in the user account.

I may up the ante if i see it needs it, but .80 is all i have in my account ATM.

BTW, i may need more work done...
1480802118
Hero Member
*
Offline Offline

Posts: 1480802118

View Profile Personal Message (Offline)

Ignore
1480802118
Reply with quote  #2

1480802118
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1480802118
Hero Member
*
Offline Offline

Posts: 1480802118

View Profile Personal Message (Offline)

Ignore
1480802118
Reply with quote  #2

1480802118
Report to moderator
1480802118
Hero Member
*
Offline Offline

Posts: 1480802118

View Profile Personal Message (Offline)

Ignore
1480802118
Reply with quote  #2

1480802118
Report to moderator
1480802118
Hero Member
*
Offline Offline

Posts: 1480802118

View Profile Personal Message (Offline)

Ignore
1480802118
Reply with quote  #2

1480802118
Report to moderator
dogisland
Sr. Member
****
Offline Offline

Activity: 261



View Profile
September 14, 2011, 07:38:59 AM
 #2

Have a look at your apache logs. You should see the requests coming in from BitcoinNotify.

Bitsky
Hero Member
*****
Offline Offline

Activity: 542


View Profile
September 14, 2011, 08:17:46 AM
 #3

You're seeing a blank page because you don't send any POST data. The reply to bitcoinnotify's request would contain the POST data in its reply.

If you need to see the data, your script needs to log it. You can simply dump it into a file:

Code:
<?php
$f
=fopen('/path/to/logs/bitcoinnotify.log''a');
fwrite($f"[".date('r')."]: data received\n");
fwrite($f': POST: '.print_r($_POSTtrue));
fclose($f);
?>


Remember that, depending on your config, you might have to adjust the permissions on the log file so that your webserver can write to it.

Bounty: Earn up to 68.7 BTC
Like my post? Feel free to drop a tip to 1BitskyZbfR4irjyXDaGAM2wYKQknwX36Y
hamburger
Full Member
***
Offline Offline

Activity: 131



View Profile
September 14, 2011, 08:43:34 AM
 #4

Hi,

First create a file output.txt and chmod it 777


Then create a file test.php or whatever you want to name it and past this code in it;

Code:
<?php

    $output 
file_get_contents('php://input');

    
$fp=fopen($tmp_path."output.txt","a");
    if(
$fp) {
      if(
flock($fp,LOCK_EX)) {
        
fwrite($fp,$output."\n");
        
flock($fp,LOCK_UN);
      }
      
fclose($fp);
    }

?>

Send notifications to this file and the result should be recorded in output.txt

Just adjust the file names and paths to make it secure to receive your notifications - also have a look at http://www.bitcoinpayflow.com/ as alternative or back up notification or complimentary notification to enhance your security. 

Hamburger
wildboy211
Sr. Member
****
Offline Offline

Activity: 294


View Profile
September 14, 2011, 01:14:45 PM
 #5

Hamburger and bitsky, both of those worked, so im going to split the reward because bitsky got to it first, and hamburger also showed me a great alternative to bitcoinnotify. Please PM or reply with your bitcoin addresses.
Thank you guys!
wildboy211
Sr. Member
****
Offline Offline

Activity: 294


View Profile
September 14, 2011, 01:16:57 PM
 #6

Bitsky, your address was in your sig, so i sent the coin to that address.
Bitsky
Hero Member
*****
Offline Offline

Activity: 542


View Profile
September 14, 2011, 03:11:46 PM
 #7

Thanks!

Bounty: Earn up to 68.7 BTC
Like my post? Feel free to drop a tip to 1BitskyZbfR4irjyXDaGAM2wYKQknwX36Y
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!