Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
I have a problem about Curl Http Post
Old 06-05-2009, 11:58 AM I have a problem about Curl Http Post
hayalet_kral's Avatar
Junior Talker

Posts: 2
Trades: 0
Hi everybod.I have a question for you.
I am trying to send post to html form.But I could not it.Please help me.
This is my html form ekle.php(add.php)
PHP Code:
<?php 
include ('ayar.php'); 
$islemformu '<form action="kaydet.php" method="post"> 
<input type="text" name="adres" /> 
<input type="submit" /> 
</form>'

echo 
$islemformu 
?>
and this is kaydet.php (save.php)
PHP Code:
<?php 
include ('ayar.php'); 
$gelenadres =  $_POST["adres"] ; 
mysql_query ("INSERT INTO loglar (adres) VALUES ( '$gelenadres' )"); 
echo 
$gelenadres Kaydedildi"
?>
And other Sender (My Curl Post Page)
PHP Code:
<?php
$ch 
curl_init(); 
curl_setopt($chCURLOPT_URL,"http://siteadresim/script/ekle.php");  
curl_setopt($chCURLOPT_POST1); 
curl_setopt($chCURLOPT_POSTFIELDS,"adres=http://www.google.com.tr"); 
curl_exec ($ch); 
curl_close ($ch);  ?>
Where is the my error? Curl is not working.I must be post it.

Last edited by hayalet_kral; 06-05-2009 at 12:02 PM..
hayalet_kral is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 06-05-2009, 02:06 PM Re: I have a problem about Curl Http Post
mgraphic's Avatar
Truth Seeker

Latest Blog Post:
JAMISONTUNES
Posts: 2,918
Name: Keith Marshall
Location: Connecticut
Trades: 0
first thought is that you may need to encode your post values:

curl_setopt($ch, CURLOPT_POSTFIELDS, 'adres=' . urlencode('http://www.google.com.tr'));
__________________

<mgraphic /> - I don't have a solution but I admire the problem.
mgraphic is offline
Reply With Quote
View Public Profile
 
Old 06-05-2009, 05:01 PM Re: I have a problem about Curl Http Post
hayalet_kral's Avatar
Junior Talker

Posts: 2
Trades: 0
it did not work.Can you write a simple script for example?
I could not it .
hayalet_kral is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to I have a problem about Curl Http Post
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.17659 seconds with 12 queries