asmith Posted December 12, 2007 Share Posted December 12, 2007 how can i save the amount number of a user which transfer to the site account , into mysql immidiately after the transfer is done ? for example , e-gold . how can i put a link for e-gold on site , and when user john click on it , and transfer 3 $ to the site egold account, i save that 3 in mysql after his transfer has been done successuly ? Quote Link to comment Share on other sites More sharing options...
dsaba Posted December 12, 2007 Share Posted December 12, 2007 don't quite understand your question perhaps you should explain better nevertheless... if you mean to be able to access john's account via e-gold, and make a script to access john's account given credentials like pass/user, it should probably involve you POSTING to the form on that site and then reading its contents you can use cURL for this to save any piece of data in mysql is no different just because the piece of data comes from e-gold Quote Link to comment Share on other sites More sharing options...
asmith Posted December 12, 2007 Author Share Posted December 12, 2007 hmm lets say it in a different way , i want to save the amount that has been transfer to the site account , in mysql BUT exactly after it has been transfered. example : john transfer 3 $ e-gold from his egold account to the site e-gold account , after he has transfered, the number of his amount will be stored in site mysql database. Quote Link to comment Share on other sites More sharing options...
dsaba Posted December 12, 2007 Share Posted December 12, 2007 you will have determine when he has finished sending money via e-gold and how much he has sent to e-gold if your script handled the POSTING to e-gold if its a form, then you would know when he's done posting and what he posted wouldn't you? Quote Link to comment Share on other sites More sharing options...
asmith Posted December 12, 2007 Author Share Posted December 12, 2007 hmm i'm getting more confused. can you show me any example codes ? things that are making me confuse are : the process of transfering is in another site . how can i know when it is finished ? can i run the egold transfer page THROUGH my site ? and how to find out HOW MUCH he has transfered ? Quote Link to comment Share on other sites More sharing options...
dsaba Posted December 12, 2007 Share Posted December 12, 2007 if its an external site you have no control over it, unless you're the admin of that site however instead of the user communicate with that site himself, you can faciliate the communication between e-gold and the user, by having your site/server/php script communicate to e-gold, and the user use your site to communicate to e-gold, this way your site is the middleman, so all the data passes through you, and you have access to it, POSTING to the form on e-gold via PHP is one way of doing this HTTP POST is a protocol to communicate with other websites, primarily used in posting html forms I suspect that e-gold must use a form to do any kind of transaction, you can make a php script to POST to the from on e-gold using cURL, this way you can control the information being sent to e-gold examples: http://curl.haxx.se/libcurl/php/examples/ http://us.php.net/curl <?php // // A very simple PHP example that sends a HTTP POST to a remote site // $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,"http://www.mysite.com/tester.phtml"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, "postvar1=value1&postvar2=value2&postvar3=value3"); curl_exec ($ch); curl_close ($ch); ?> Quote Link to comment Share on other sites More sharing options...
asmith Posted December 12, 2007 Author Share Posted December 12, 2007 thanks for the information. anyway paypal is so much different ? the example i said about egold , is much easier with paypal ? or all are the same ? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.