CURL Form Posting To Self Referencing Form Action
I've successfully used CURL to maneuver around and through sites
but a new site I've been trying to work with has got me stumped.
To retrieve the data I'm trying to get a login is required. If
you go to any page in the "member" area without logging in you
get directed to a https connection and hit login.php (ie: you
end up at https://www.domain.com/login.php). The problem, I
believe, lies in the fact that the form on that page references
itself in the form action tag.
The action tag in the form is "/login.php" and nothing I've tried
has been successful in getting CURL to actually submit the data
and get me logged in. Not surprising really since you'd normally
point CURL to the action target to pass form data.
The things I've tried so far without luck are:
* Hit the main site page to pick up the session cookie then go
to one of the "member" only pages
* Gone directly to one of the "member" pages to get redirected
to login.php
Both attempts end up simply returning me the contents of the
login.php page which, obviously, doesn't help or do any good.
What isn't clear from the CURL documentation with PHP is whether
or not the CURLOPT_POSTFIELDS get passed to pages after a redirect
takes place. I suspect they are but the fact that login.php
refers back to itself seems to be the real problem.
If anyone has any ideas on how to convince CURL to get me past
login.php or any other suggestions on things I could try I would
very much appreciate it.
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Posting To A Form With Image Verification With CURL
this code keeps posting the wrong image verification code, to the form, because when it loads the form again to post the code that I retrieved the image verification code, is now changed How can I do this successfully with curl? If you have any experience with using curl functions in php you CAN help me on this one....
Blank Response By Curl When Posting Form Data
Here is my code, and the problem: $st="...(string to post is formed from different variables read from file)..."; $lngth=strlen($st); $ch = curl_init(); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_URL, $url2); $fp = fopen("example_homepage2.txt", "w"); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT,20); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); curl_setopt($ch, CURLOPT_REFERER, $url); curl_setopt($ch, CURLOPT_FILE, $fp); curl_setopt($ch, CURLOPT_COOKIEFILE, "cookie.txt"); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDSIZE, $lngth); curl_setopt($ch, CURLOPT_POSTFIELDS, $st); $page2=curl_exec($ch); curl_close($ch); fclose($fp);
Curl: Posting Form Variables Results In Redirection
I'm using the curl functions in php to scrape the wan ip address from my home router (the router is an SMC product). This is a two step process: 1. post the password value to the login.htm page 2. capture and parse the content from the status_main.htm page On the SMC's login.htm page there is a form with the following elements: <form name=tF method=post action=login.htm> <input type=password name=pws> <input type=hidden name=page value=login> <submit value='LOGIN'> Here are three test cases - only the first two work as expected. I need to understand why I got that third response... posting the variables causes a the SMC to give me a redirection to index.htm which does not exist? COMMAND LINE TEST (returns login.htm and status_main.htm accurately): curl -d page=login.htm -d pws=mypassword http://10.10.10.1/login.htm curl http://10.10.10.1/status_main.htm | grep 'wan_ip' PHP NO-POST TEST(returns login.htm accurately): $ch = curl_init("http://10.10.10.1/login.htm"); $strIP = curl_exec($ch); curl_close($ch); PHP POST TEST (returns an unexpected result): $ch = curl_init("http://10.10.10.1/login.htm"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, "page=login&pws=mypassword"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $strIP = curl_exec($ch); curl_close($ch); print "<!-- $strIP -->"; <!-- <html><head><meta http-equiv=refresh content=Ɔ url=/index.htm'></head></html> -->
Blank Response From Curl When Posting Form Data
Here is my code, and the problem: $st="...(string to post is formed from different variables read from file)..."; $lngth=strlen($st); $ch = curl_init(); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_URL, $url2); $fp = fopen("example_homepage2.txt", "w"); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT,20); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); curl_setopt($ch, CURLOPT_REFERER, $url); curl_setopt($ch, CURLOPT_FILE, $fp); curl_setopt($ch, CURLOPT_COOKIEFILE, "cookie.txt"); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDSIZE, $lngth); curl_setopt($ch, CURLOPT_POSTFIELDS, $st); $page2=curl_exec($ch); curl_close($ch); fclose($fp); I tried both with and without POSTFIELDSIZE option, with same result. This code works fine for strings smaller than 800 characters (actually 795 or so), but my regular string is just under 13000 characters. I have uploaded the script to 5 webservers (including my development machine with Win XP , PHP 5 and Apache 2.2.) and it only works on one. The rest return a blank page to stare at on the curl post. Is this some configuration issue, or a curl issue?
Referencing PHP_SELF Variable Within HTML Form - Problem...
I am developing a simple web site that contains a form page. The apps utilized are apache 2.0.48, php 4.3.4 on redhat 8.0. I have built a simple web form with one text box and a submit button. The result of pressing the submit button should be php echo'ing the input back to the screen. Attached is the tiny code snippet below: ---------------------------------------------- <html> <head><title>PHP Forms Example</title></head> <body> <form action="<?php echo $_SERVER['PHP_SELF'] ?>" method="POST"> Type a string: <input type="text" name="myString"><br> <input type="Submit" name="submit" value="Submit Journal"><br><br> </form> <?php print "You typed: $myString"; ?> </body> </html> ---------------------------------------------- The problem I am experiencing is that the print statement doesn't print anything back to output. If you notice, I changed the reference PHP_SELF due to 4.2.x modifications in php.ini.
Two Action In A Form?
can i put two actions in a form so that when i click the "submit" button, the information will be sent to both the database and my email account?
Knowing The Form Action
Is there a way to know if the page is: - directly called from the browser - called by the submit button pressed in POST mode - called by the submit button pressed in GET mode
Php Variable In The Form Action
i have this in my intro.php form. Code: <form action="intro2.php" method="post" target="main"> is there a way i can assign a variable to take the name of the script, and put a two on it....then i can put that variable in place of the intro2.php? I have a lot of these files, and when it comes time to replace all those intro2.php's, its gonna be a pain in the neck.
How Do I Run More Than 1 Action Script From A Form?
I need to execute an sql query, then a paypal script from the same form. How do edit the code below to do this? <?php <form method="post" action="https://www.sandbox.paypal.com/cgi-bin/webscr" target ="paypal"> </form> ?>
Submit Form With Variable For Action?
So, i've got a form that is very simple. It hold three elements: username, password, and domain. The goal here is to have the form submit the login to an administrative section depending on which domain someone has chosen. For instance, let's say we have three administrative sites, that all have different URLs, but we want this one form to handle logging into any of them. So, the form itself needs to have a dynamic action element. Here's an example: Code: <form action="http://www.mysite.com/admin/index.php" method="post" name="login" id="login" > <input name="usrname" type="text"> <input name="pass" type="password"> <input name="domain" type="text"> <input name="submit" type="submit" value="Login"> </form>
Getting Data From Address Bar Into Form Action.
Here is the problem...i have a game where a users id and encrypted password are stored in the address bar on every page of the game. e.g. main.php?P=bank&uid=15&password=faspmi9r329m2d324sd now i have a problem when trying to link to a page through a form while still keeping these variables in the link to be more specific i have a form for a user to deposit gold into their bank upon entering a value in the input box and clicking either deposit or withdraw the form is to reload the same page where the proper if(isset($_POST command will take over and do the correct job. The only problem is if i use a $_SERVER['PHP_SELF'] as the action for the form when it reads back on its self again it doesnt include the uid or password...it simply is reloading main.php ...my question is.... how do i get these variables sent back through the form button so the page will reload with the users information still there?
PHP And Frame Updates From Form Submit Action
I have created a page with two frames on it. The main frame contains a simple form that collects a username and password. The form code is as shown below :- <form method = "post" action = "getname.php"> Login Name : <input type="text" name="login_name" size=12><br><br> Password : <input type="text" name="passw" size=14> <input type = "submit" name="submit" value = "Login" > </form> The php function getname assignes the value of "login_name" to a usable variable for later use. Here's the problem, After the form's submit button is pressed I want update the contents of the second frame automatically, I also want it to contain the value for the login name entered on the form. Is there a way of automatically updating the second form so that I can fill it with dynamic contect?
Form Action To Same File Opens New Window
Two questions late at night and going stir crazy. Anybody who takes pity on me will have my undying gratitude and a virtual bottle of beer. I've tried to look them both up on the php.net, and elsewhere, but without success. 1. Am writing a php program which checks entries in a form on a previous page. It then asks for any empty fields to be filled, and submits the resulting form back to itself to check it again. In other words the file "checkblank.php" includes this line within the php: echo "<form target="checkblank.php" method="post">"; When the form is submitted it opens in a new window (in FireFox). In Firefox it is not a disaster as the variables and arrays are not lost, and the program works, but popups are not something I like. In IE the whole thing collapses in a heap as the variables appear not to be passed to the new window. Needless to say, the vast majority of users will have IE. Is there a reason I'm unaware of, and can it be stopped easily? 2. Can anybody suggest a quick and easy way to strip arrays? stip_tags is fine with variables, but converts arrays to variables. I'd like to use it for the sake of security though. I don't particularly want to translate the array into a whole lot of variables, as it's a big array.
Passing Credentials In A Form And Perform Action
All, I want to create a script that performs the following: 1. Access a page and submits authentication credentials (www.example.com/login.html) 2. Once authenticated, grab values of a form (www.example.com/logs.html) I just need to be stepped through the thought process. Unfortunately, I can't use cURL because the main page doesn't request for authentication. Instead, it's an authentication form/page. Or perhaps I can still use cURL, but not use its auth mechanism of CURLOPT_USERPWD. Here's the form parameters that must be submitted: <label>Username:</label> <input type="text" size="14" name="username" value="User" /> <label>Password:</label> <input type="password" size="14" name="password" value="" /> <input type="submit" value="Login" />
Remove Record Id From Static Name In Form Action Script
I am creating a page that has multiple dynamic forms, two of my form elements are using a static name and the record id (this is needed for another reason.) I need to remove the record id, so my post in my update script will be: $date_start=$_POST['start']; $date_finish=$_POST['finish']; <input type="text" name="start<?php echo $task_number; ?>" value="<? echo $date_start; ?>"> and <input type="text" name="finish<?php echo $task_number; ?>" value="<? echo date_finish; ?>"> In the update script I can access the input value by using the variable ${'start'.$task_number} Is there a way to remove $task_number from it so it posts as 'start' and 'finish'? Do I somehow need to provide the form action script a list of task_numbers via an array serialized and urlencoded via a hidden field to decode and unserialize? If so, does anyone know how? If not, does anyone know how I can do this?
Form Posting
1. How can I now the url that posting the form? ex: I make a php page name poster.php. There is a form that has action to recipient.php. Then I need check that the form is surely posted from poster.php. 2. Can I post a form from to the other site that has different host? How it could be?
Form Posting
i have a form that points to a document on my local site, like: <form action="test.php" method="post"> <input type=hidden name=value1 value="something"> <input type=submit value=submit> </form> now, i would like to post the form data to the test.php file, from another php file (let's say test2.php)! how to do that? i cannot call http://localhost/test.php?value1=value1 because the method is POST (it doesn't work)?
Posting Form Data And Also Allow To Download Form Data
i have a client that whats to post form data to a database but he also wants users of the script to download it aswell how will i got about doing this i thought about it that i could make it save it into a txt file then echo the download link is there any ideas? because to post it to a txt file it would be posting 2 places is there a way to do this? Code:
Form Data Not Posting
I was reading the forums and have not found the answer and could use some help. I am a novice and am learning how to do this out of neccesity for my non-profit org. I have a database with incidents that we react to during emergencies. I want to be able to have the users call up the record via ID (that works), change the status and/or details and save update mysql. It is just not saving the data. PHP Code:
Posting Form Fields
I have a form like the one below. Upon submit I would like to self post to the same page but have the original $_POST data( which was posted to this page from another ) also be sent along with the new form field data. How can I achieve that? Thanks. <form name="form1" method="post" action="<?php echo $_SERVER['PHP_SELF']."?".$_SERVER['QUERY_STRING']; ?>"> <table> <tr> <th><input type="text" name="fields[]"</th> .... <th><input type="text" name="fields[]"</th> <th><input type="submit" value="Add" name="add"</th> </tr> </table> </form>
Form Not Posting Variable
I have a form which has a select box form and a text box form. for some reason I can't get the Select box to pass the variable to the php file PHP Code:
Form Posting Difficulty
I'm doing a login form and i am trying to get it to post to a page that would vary based on the username given. I have figure out how to display all the info once it is posted. I mean i know how to select it from the db but other than that i'm kinda at a dead end. so far i have the following code snibblets: Form Login <html> <head> <title>login</title> </head> <form method="post" action="main.php?user=$_POST[username]"> // basic login form here with username and then username text box and then password and then password box and then submit button. // the name of the username field is username, name of password field is password and then submit button field is submit. Display page
Posting A Form To Another Script ?
Is there a way to "post" a form to another php script? For example input.php retrieves some user variables then posts the results to another script , say form.php? I know this can be done using perl's LWP by creating an agent. Let me know if this makes sense or not? I know I can use GET, but I want to avoid GET for some other reasons.
Posting To Php Without Html Form
I am quite familiar how to create a php page that POSTS or REQUESTS variables sent by an html form HOWEVER, I am wondering if it there is a way I can post variables to another php page or page in general, with php, and skip the form all together, for example: I have this page that POSTS information from an html form it make $id = $_POST['id']; this page is called formprocess.php now what i want to do is instead of having to use the html form to actually submit this data to formprocess.php, i want to submit this data with php I have a page called send-data.php i want this page to send the 'id' variable straight to the formprocess.php page with no html form.
Posting Form Data To Two Php Scripts At Once
How do i post the form data to different php files at once. I tried the following code but it doesn't work. the data is sent only to the first php file. <form method="post" action="insert.php" action="mail.php"> Email<input type="text" name="email" value ="" size="20" /> <input type="submit" value="submit" /> </form> Is there a solution?
Libcurl Form Posting Problem
I've been trying to write a short script using curl w/ php but can't figure something out: I'm simply trying to login to a website using a posted user/pass combo to an html form (login.php) that, if correct, sends a Header("Location: success.php"). The problem I'm running into is when I successfully login, i'm watching the logs and it's actually executing success.php but after that's done the screen just refreshes and stays on login.php... does this have anything to do with the session variables that are written to tell the system that I should be logged in? Does this make sense? Below are my opts. $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,$url); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER,0); curl_setopt($ch, CURLOPT_FOLLOWLOCATION,1); curl_setopt($ch, CURLOPT_HEADER,0); curl_setopt($ch, CURLOPT_POSTFIELDS, $post_fields); $curl_output=curl_exec ($ch); curl_close ($ch); echo $curl_output;
Form Suffers From Premature Posting
I have created an HTML form that has the form action set to: <form action="forms_orderconfirmation.php" method="get" name="FormName"> My intention was to create a confirmation page with a submit button that the client would select after confirming that their information was correct. My problem is that the information gets posted to my email merely by linking to the confirmation page. It does not wait for the clients final approval. In fact the submit button does not submit anything... but going to the page does. code:
-> How To Read A Form Variable Before Posting? <-
is there a way to read the content of a form variable before a POST? I have a form with a "duplicate" button which opens a new form with most of the fields filled with the values of the calling one. To do so, I pass the id of the form to be duplicated. Example: - I have a form with "Number = 1234567" in a "numform" edit field. - Duplicate has a href=/duplicateform.php?id=1234567 - then the "duplicateform.php" reads id with a GET['id'] This is easy as I come from a displayed form that retrieves its values via a SQL statement and with a specific "number" reference. Now, once I am in this new form, I have a save button to save all values, including the new "Number" the user would type in, say "22222222". The save process works correctly via AJAX and saves the record using a POST action. But then, I still have my "duplicate" button which should now point to href=/duplicateform.php?id=22222222 How can I get this 22222222 value from within the form itself? I have to get it from the "numform" field, but how can I do this? it would be something like href=/duplicateform.php?id=<?=[value_of_field_number]?> with value_of_field_number being the actual value of that edit field.
Posting PDF Form Data To MySQL
I am working on a script that will take information submitted from a pdf form and store the field data to a given mySQL table. I just cant figure out what is wrong with my script. I am able to get the data from the pdf form, and set it as a variable so I can work with it in php. It is displaying the proper data when I echo() it, and I get no mySQL errors. It looks like everything should work, but when I check my database, nothing has been updated....
Posting From A Form Without A Submit Button - How?
Given something like: if ( $_POST['type_save'] == 'Save record to HTGI public DB') { echo '<form method="post" action="populate08.php">' echo '<input type=hidden name="kw_tarea" value='.$tk.'>' echo '</form>' echo '<p>permanent DB updated' } But there's no button to press for a submit. So how do I get this code posted to the action=populate08 ? Without pressing a buttom but just from the code?
Posting Form Data To Two Scripts At Once
From: "Norman Peelman" <npeelman@cfl.rr.com> Subject: Re: posting form data to two php scripts at once Date: Sunday, December 17, 2006 12:06 AM <one.1more@gmail.comwrote in message news:1166317725.715320.309280@80g2000cwy.googlegro ups.com... Quote:
PHP Event Calendar Posting Form
I'm using the basic PHP event calendar tutorial that is on this website, and I made a form to add the events. The problem is that the date isn't posting right into the MySQL. For the date it says: '0000-00-00' instead of what I inputed. Code:
Posting Form Variable Using Header()
I know I have seen it somewhere but cannot find how to do it right now. How do I use header to submit post vars "without" a form. The company I work for is using a 3rd party email marketing company (until I can get the time to build a system to bring it in house), and this company is working with me to keep the form, thank you and error page aspect on our site. I need to take the variable from the form and process them to do some validation and then send these post vars off to their page so it can be inserted into a database. They don't do any validation on their side with this setup so I want to do it on my side and use header() to submit the post vars.
Form, Posting Multiple Fields
I have a product list page, users can check the product then go to an e-mail form, that lists the products they checked. On this, they can then chose a quantity for every product, how do I make it so when they send the e-mail, it gets the quantity for each product (using PHP mail, to send)? The field would be: <input type="text" size="4" maxlength="4" value="1" name="quantity"> But that wouldn't work for multiple ones? Would I use a "foreach" statement, somehow?
Posting Information From A Form To A Text File
I am trying to append the results from a form to a text file. My code is supposed to print out the results on one page, and append the results to another page each time data is entered on the form and the submit button is hit. Unfortunately, it is only printing out the message acknowledging the submit button--no data on either form. Code:
Security Issues With Posting Form Contents To Server?
I'm currently reading a php book that attempts to declare the security hazzards of not screening a form's content before allowing it to be posted, whether to a database, text file, or otherwise. Honestly, I still don't get what the problem is. Lets say magic quotes is turned on. Could someone list the major things I should still be doing to prevent security problems? For example, the book says to use htmlspecialchars(), though how does allowing the user to enter HTML tags compromise anything? The data simply gets posted as is to a database, then output as is Maybe an annoying JavaScript is output, but hardly a security breach to the server itself as far as I can tell.
Posting Data To Another Form And Getting Handle Of The Opened Window.
I have posted a form to a PHP file in a new window with target attribute. My problem is that my application should not allow user to post the form again. User should close the window and then only (s)he can post the form again. Can we get the handle of the opened window? If we use window.open then we will get the handle of that window but I am unable to post data with window.open. Any idea on posting data to modal windows. Not as parameters but as $_POST.
Form Processing: Change The "action=" Based On Pull Down Menu
I have an html form for that uses username and password to login to a specific area of the website. The "area" the user wants to go to is based on a pull down menu. Becasue the user/password info is in differnet databases, how can I call different validation scripts based on this input ? See below please. Somethinglike this: form.html: <form name="loginform" method="post" action="login.php"> <select name="loginform"> <option value="one">Section 1</option> <option value="two">Section 2</option> </select> login.php: @extract($_POST); if($_POST[loginform] == "one") { echo "action = /forums/scc/dispatch.cgi/_admin/AVFLogin" NAME="LoginForm" > echo "<input type=hidden name="autologin" value="1"> "; echo "<input type=hidden name="formstyle" value="standard"> "; echo "<input type=hidden name="returnforum" value="_admin"> "; echo "<input type=hidden name="returnmsg" value="acahomepage"> "; } else { echo "action = /path to different cgi "; echo :different values for hidden fields". }
CURL - Form Related
I want a page which I can host where users fill in a form and the same data is sent to a form hosted remotely. I then want it to simpy display another page that I'm hosting. So not like: form fill--->> ends up going to there site form fill--->> submits data to that form>>back at my site. The form on there site looks like:
Post Form With Field Containing "curl Curl"
I have a form that posts and 1 field is for a suburb, 1 of the suburbs in our area is "curl curl". When ever this is entered we get an error message "You don't have permission to access".
Get Form Elements From A Page Using Curl
I am trying to get all form elements on any page using curl. I can get the data no problem but I think the preg_match_all is all screwy because I don't get the results I want. Here is my code: ....
CURL To Post Form Data To Another Site
Is there a way to use CURL to post form data to another site and make the URL change from the current php script to the url of the site that I curl to? Right now when i test this the URL remains as the name of mu script ... ie> www.mysite.com/curl.php instead of changing to the address I am doing the curl to. I tried setting this variable curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); but it only changes to the new sites URL when I click a link on that site.
Server-Side Form Submission - Form Submits To Form, Which Autosubmits. BAD!
I have a php form from which the user fills out their name and address and clicks "Submit". The form goes to a page that stores the data in a mySQL database, then, using hidden fields, populates another form and actives with a javascript onLoad=submit() to send the information on to the final destination. I cannot control or edit the final destinations web page, which is why the interim page is needed. What I would like is for the user to fill out the form, and upon submission have the data recorded into the database and have the data passed on in a "form like way" on to the final destination BY THE SERVER, not by the use of a hidden form page that auto submits. Any suggestions? Here is the interim page's code below: <? $link = @mysql_connect($db_host_name, $db_name, $the_decoded_password) or die; @mysql_select_db($db_name) or die; $query = "INSERT INTO web_link VALUES ('', '$a', '$b', '$c','$d', '$e', '$f', '$g', '$h')"; $result = @mysql_query($query) or die; ?> <html> <head> </head> <body onLoad="document.contactme.submit();"> <form name="contactme" method="post" action="http://www.test.com/cgi/storethisdata" > print "<input type="hidden" name="first_name" value="$first_name"><br>"; print "<input type="hidden" name="last_name" value="$last_name"><br>"; print "<input type="hidden" name="email" value="$email"><p>"; print "<input type="hidden" name="phone" value="$phone"><p>"; ?> </form> </body> </html>
Form Submission (no Button) Using PHP+cURL+ Transfer Control To Other Site
I'm trying to send data using the POST method and also have control of the browser be turned over to the website that's receiving the POST data (note that this is NOT the same as sending the data via POST method and then redirecting to the website after). I need it to work exactly like hitting the submit button on an html form, and I need it to work from PHP. It needs to POST the data to the site and also let the other site have control at the same time. I've tried a couple of methods using both cURL and an fsocket function, but it seems like in both cases that (1) the data gets sent to the other site first, (2) then my program gets a response back, (3) and then it redirects to the other site afterwards. The data gets sort of POSTed to the other site (I get a 200 response back, and I get info showing it was posted correctly), but since the other site does not get control, it seems to dump (not save) the posted data. Code:
Posting With CURL
I can't figure out why is it that when i use an array for my postfields it doesn't work : this works curl_setopt($curl, CURLOPT_POSTFIELDS, "clown=bozo" ); this doesn't curl_setopt($curl, CURLOPT_POSTFIELDS, array('clown'=>'bozo') ); The web site i post to only responds when my parameters are in a string, but it sends nothing back when i use an array - no headers, no error, nothing. And cURL shows no error either. So there must be something different in the way cURL posts from an array. It's like the web site reads it differently than when i post a string and possibly some error is generated on the server. I make other posts to the same web site and all is okay except when i use an array. Any ideas what might be going on? Here is the full code ....
CURL Double Posting
I am using cURL to process NETeller payments. Everything works fine however on NETellers' end, double payments are being made. I am not sure if curl is somehow double posting or not. Has anyone experienced this issue? $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,$url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 50); curl_setopt ($ch, CURLOPT_POSTFIELDS, $param); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); $xml_results = curl_exec($ch); Mysql 4.1.16 , Apache/2.0.54 and PHP5
Posting Xml With CURL (post Header)
How can i create cURL post with these headers? POST /xml.dll HTTP/1.0 UserAgent: IE6 Content-Type: text/html Content-length: #counter goes here what CURLOPT_'s i should use for posting?
|