Bitcoin Forum
April 25, 2024, 09:31:48 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: .80 to whoever can help me figure this out. (Deposits w/ PHP)  (Read 1148 times)
wildboy211 (OP)
Sr. Member
****
Offline Offline

Activity: 294
Merit: 250


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...
You can see the statistics of your reports to moderators on the "Report to moderator" pages.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
dogisland
Sr. Member
****
Offline Offline

Activity: 262
Merit: 250



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: 576
Merit: 514


View Profile
September 14, 2011, 08:17:46 AM
Last edit: September 14, 2011, 09:45:13 AM by Bitsky
 #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: 241
Merit: 107



View Profile WWW
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

Datacoin : DHZ6H91fsDoBHbdqED3ysCJJ2TUh3zRMZD
Krugercoin : Yz3A9sTMp2yh5QLuAL8YQyvS5PdjHRHkkf
wildboy211 (OP)
Sr. Member
****
Offline Offline

Activity: 294
Merit: 250


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 (OP)
Sr. Member
****
Offline Offline

Activity: 294
Merit: 250


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: 576
Merit: 514


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:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!