ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am trying to submit a form automatically with a cURL script i have configured, but i dont know what my CURLOPT_URL should be?
I dont know where the action page is because the only thing there is a '?'.
PHP Code:
<"form action="?" method="POST">
Is anyone familiar with this type of thing?
In the attempt to find where the variables are posted to, i have looked in other pages downloaded with the software for a list of the variables. No Luck, i only found one page that makes them into an array:
if no page is specified, the same page is the target. the "?" there is as in "something.html?var1=abc&var2=xyz" and won't have any effect as there are no params. the whole tag could just not be there.
Now one of the functions in installer.inc.php is to print the form template.
This may all be irrelevant in what i am trying to do, if so please let me know.
My current curl attempt is:
PHP Code:
<?php
$my_data = array( 'dbType' => 'mysql', 'dbHost' => 'localhost', 'dbUser' => 'mem', 'dbPass' => 'letmein', 'dbName' => 'mem_com_-_sy', 'dbPrefix' => 'mel_', 'dbPersistent' => 'false', 'syPath' => '/var/www/html/userz/mel/', 'uploadPath' => 'uploads/', 'syHTTPPath' => '/userz/mel/', 'templatePath' => 'templates/', 'uploadHTTPPath' => 'uploads/', 'baseURL' => 'http://www.mysite.com/userz/mel/', 'autodetect_baseURL' => 'false', //dont know if true should have quotes around it it doesnt in config file 'indexFile' => 'index.php', 'user' => 'mel', 'pass' => 'thanks', 'realname' => 'mel', //should get from signup p h p 'email' => 'michael@hotmail.com', //should get from signup p h p 'want_mail' => 'true', //dont know if true should have quotes around it it doesnt in config file 'allowSubscriptions' => 'true', //dont know if true should have quotes around it it doesnt in config file 'blogTitle' => 'John Does personal blog', 'blogDescription' => 'My little place on the web...', 'lang' => '', //dont know if true should have quotes around it it doesnt in config file 'lang_content_negotiation' => 'false', //dont know if true should have quotes around it it doesnt in config file 'fetchLimit' => '15', //dont know if true should have quotes around it it doesnt in config file 'useGzip' => 'true', //dont know if true should have quotes around it it doesnt in config file 'wysiwyg' => 'false', //dont know if true should have quotes around it it doesnt in config file 'XHTML11' => 'false', //dont know if true should have quotes around it it doesnt in config file 'enablePopup' => 'false', //dont know if true should have quotes around it it doesnt in config file 'embed' => 'false', 'top_as_links' => 'false', //dont know if true should have quotes around it it doesnt in config file 'blockReferer' => ',', 'rewrite' => 'array()', //dont know if true should have quotes around it it doesnt in config file 'serverOffsetHours' => '0', //dont know if true should have quotes around it it doesnt in config file 'showFutureEntries' => 'false', //dont know if true should have quotes around it it doesnt in config file 'magick' => 'false', //dont know if true should have quotes around it it doesnt in config file 'convert' => '/usr/local/bin/convert', 'thumbSuffix' => 'syThumb', 'thumbSize' => '110', //dont know if true should have quotes around it it doesnt in config file );
// This section constructs the field/value pairs of the form // field1=value1&field2=value2&field3=value3 $data_string = ''; $add_ampersand = FALSE; foreach ($my_data as $key => $value) { if ($add_ampersand) {
// the 3 lines below were jst 4 test purposes to make sure the variables were getting set print $cookie; // ex result: Set-Cookie: PHPSESSID=dcd730a95f8b428f7dbd9fc1e6687d1a print $nexturl; // < got no result print $cookiejar; // ex result PHPSESSID=dcd730a95f8b428f7dbd9fc1e6687d1a
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.