Minggu, 28 Juli 2013

PHP Indonesia - Facebook: [ASK] Gan, ane mau nge-POST , cuma pake curl_seto...

PHP Indonesia - Facebook
PHP Indonesia is a community for everyone that loves PHP. Our focus is in the PHP world but our topics encompass the entire LAMP stack. Topics include PHP coding, to memcached handling, db optimizations, server stack, web server tuning, code deploying, hosting options and much much more. Youtube Channel : http://www.youtube.com/user/OurPHPIndonesia NOTE: Rules for Wall posting: https://www.facebook.com/groups/35688476100/doc/10151597056316101/ Daftar Keanggotaan : http://www.facebook.com/groups/35688476100/doc/10150671770741101/ 
[ASK] Gan, ane mau nge-POST , cuma pake curl_seto...
Jul 29th 2013, 06:07, by Oda Aditiya Nicola

Oda Aditiya Nicola 6:07am Jul 29
[ASK]

Gan, ane mau nge-POST , cuma pake curl_setopt.
Ini scriptnya :

<?
$nocard=$_POST['tnocard'];

$xml = "<payment_request>
<user_id>user</user_id>
<password>pwd</password>
<card_no>$nocard</card_no>
</payment_request>";

$url = 'http://127.0.0.1:22334/velispayment/';
$body = $xml;
$c = curl_init ($url);
curl_setopt ($c, CURLOPT_POST, true);
curl_setopt ($c, CURLOPT_HTTPHEADER, array('Content-Type: text/xml'));
curl_setopt ($c, CURLOPT_POSTFIELDS, $body);
curl_setopt ($c, CURLOPT_RETURNTRANSFER, true);
$page = curl_exec ($c);
curl_close ($c);
echo $page;
?>

tapi justru failed to call function,

apa ya ? apa variable php gak bisa di baca di type xml gitu gan?

Mohon pencerahan di bulan suci ini :D

Trims

Candra Nur Ihsan 6:10am Jul 29
udah di aktifin belum curlnya?

Oda Aditiya Nicola 6:12am Jul 29
udah gan...

Oda Aditiya Nicola 6:12am Jul 29
Fatal error: Call to undefined function curl_init()

kayak gini

Suko Tyas Pernanda 6:13am Jul 29
#nyimak

Candra Nur Ihsan 6:13am Jul 29
install dulu curlnya udah?

Oda Aditiya Nicola 6:14am Jul 29
ssleay32.dll dan
libeay32.dll

harus di instal juga?

Oda Aditiya Nicola 6:14am Jul 29
curl sudah di aktifin.., apa harus restart komputer dulu gitu gan?

Candra Nur Ihsan 6:16am Jul 29
http://www.php.net/manual/en/curl.setup.php

You are receiving this email because you subscribed to this feed at blogtrottr.com.

If you no longer wish to receive these emails, you can unsubscribe from this feed, or manage all your subscriptions

Tidak ada komentar:

Posting Komentar