473,385 Members | 1,907 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

interactive mode post

Is there a way to simulate "POST mode user input" while running PHP
from the command line or in interactive mode? For example with
python, you can simulate the effects of post mode with the following
two lines

export REQUEST_METHOD=POST
echo -n 'x=y&z=t' | python myscript.py
I have tried the following, but it does not work.

export REQUEST_METHOD=POST
echo -n 'x=y&z=t' | php myscript.php

Is there I was to get a similar effect with PHP?

BACKGROUND INFO:
PHP Version: 4.3.0
OS: Linux
I compiled PHP myself because I needed the MySQL extensions. The only
options I set were "--prefix=/usr/local/bin" and "--with-mysql".
After installing there was an executable php in the /usr/local/bin/,
After reading the configure help I assume that this is the CGI/Command
line version of php. I have tested using the command line, I am able
to access my MySQL server.
Jul 16 '05 #1
1 3067
On Sun, 14 Sep 2003 18:13:11 -0500, Steven Feil created an award-winning
crop circle <be**************************@posting.google.com >, which, when
translated into English, means this:
Is there a way to simulate "POST mode user input" while running PHP from
the command line or in interactive mode? [...]


Yes, if you have CURL compiled in.

Also, you can use the socket functions to
create an HTTP POST request. See this:

Message-ID:
<pa********************************@REMOVE.MEearth link.INVALID>

BTW, in that message, there is a minor error. After
the paylod of the request is sent, a CRLF it *not*
required.

Jul 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Christoph Becker-Freyseng | last post by:
Hello, is there a way to dump (and save) the command-history of the python interactive mode. Thanks, Christoph Becker-Freyseng
0
by: Steve Menard | last post by:
I have a strange problem with Python command-line interactive mode. Problem has been observed on every 2.3 version where it was tested, from 2.3 alpha to 2.3.4 Test is run on windows XP and 2000...
7
by: B.G.R. | last post by:
Hi all, I'm working on an interpreter for a university subject, which is programmed in python under linux. I got most of the work done and I'm just trying to settle some problems I've found on...
3
by: DGG | last post by:
I have got a question arsing from my perl program. Basically, I want to get the machine date and time, and display it on a Tk label. I am using ActivePerl, and running on DOS/Windows. So I...
1
by: Alex | last post by:
Loking at Rossum's tutorial I've seen that he sometimes uses the expression "interactive mode" and sometimes "calculator mode". Or these concepts same? I've made the following assertion. ...
3
by: Pankaj | last post by:
I am facing a very basic problem as any new bie would face. I know perl and now i want to use python In perl, it is very simple , just "perl scriptname.pl" will execute the script. But i...
4
by: digitnctu | last post by:
Dear all: I am coming with problem, to apply ctypes under interactive mode in python. libdll.dll is a third-party library. The below code segment will run well under the batch mode(ie. python...
3
by: Sal | last post by:
I'm running PHP 5.2.6 on WindowsXP. When I try interactive mode with ">php -a" the slightest syntax error throws me out of the interpreter and back to the command line. This is not very useful....
2
by: sharath067 | last post by:
I want to dynamically update the scatter plot based on the y-axis data received from a socket connection. I used python matplot lib in interactive mode to do this, but during dynamic updation if i...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.