What are the HTTP Headers performing a POST?
I need to simulate a POST to a webpage.
NOTE: I do not want to use curl or the post-to-host function, since these
get the information.
What I want to do is this:
I enter the page "localhost/post.php" where there are a set of HTTP Headers
for sending
I am building my first basic function to verify a session.
If the verification is not in the function it works...
What am I missing?
(I couldn´t find anything about this in the mailing list archive)
-- This works --
session_start();
if (isset($PHPSESSID)){
echo "ok";
I am constructing a function for retrieving records from a mysql database
and putting them into an array called $print_field[name][number].
My problem is that I only seem to get the first two records and I think I
know where the problem is, but I can´t seem to be able to solve it.
Any ideas
nking
area?
Thanks,
// Tobias Talltorp
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
://marc.theaimsgroup.com/?l=php-general)
I like this one better than the manual to search for problems similar to the
ones I have...
// Tobias Talltorp
"Rick St Jean" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
It is there a list of most frequently asked qu
Thanks a million man!
This did the trick...
Best Regards,
// Tobias Talltorp
""Mahmoud Abu-Wardeh"" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
try this: (you need to escape the variable part of the variable variable
with {
with JavaScript...
Just a tip:
Check out the cURL-functions in the manual.
They do the stuff that the Post-to-Host does, but much much more...
Regards,
// Tobias Talltorp
""Boget, Chris"" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
A
See the SMTP value in your PHP.ini and set it to a valid outgoing mail
server
Another thing I have noticed, perhaps this is only me, is that if the
TO-address isn´t valid it will fail.
Try to send an email to your own email address...
// Tobias
""Eric Tonicello"" [EMAIL PROTECTED] wrote in
This seems to be more of a HTML problem.
Form fields simply can´t print out ". You need to change the " to quot; in
order for it to appear.
This can be done using the function htmlspecialchars():
http://www.php.net/manual/en/function.htmlspecialchars.php
In your case:
?php echo
You need to set the permissions in that folder so that you can write.
PHP acts like IUSR(computernmae), so set IUSR(computername) permission to
write.
This is Windows, by the way...
// Tobias
""Salim Meethoo"" [EMAIL PROTECTED] wrote in message
99c90k$83u$[EMAIL
I am trying to register a session variable in a function without using the
global in the beginning.
The reason for this is that I don´t always know how many variables I am
going to register (I separate the different fields with | like this,
"username|email|cellphone" and explode them).
Is there
al_vars[$i]; // Variable variables
... session setting code
}
register_vars("username|email|cellphone") ;
This way I only make the nessesary variables global.
// Tobias
""Tobias Talltorp"" [EMAIL PROTECTED] wrote in message
99dn35$duo$[EMAIL PROTECTED]">n
Try out cURL. I think it will work for java and C aswell:
http://curl.haxx.se
It does posts and handles cookies and more.
// Tobias
"brunatex" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hello,
Not sure if this is exactly focused on PHP, but i thought
Sorry, a post MUST come from the client. The only way I know, is to use
JavaScript for this...
// Tobias
""Peter Phillips"" [EMAIL PROTECTED] wrote in message
99p6a2$vou$[EMAIL PROTECTED]">news:99p6a2$vou$[EMAIL PROTECTED]...
Hi,
I need a way to POST data to another script on another server,
I have had this problem with exec, passthru with that configuration
aswell...
To read the files into an array, do this:
(http://www.php.net/manual/en/function.opendir.php)
?php
if ($dir = @opendir("e:\\dir")) { // Notice the double "\\"
while($file = readdir($dir)) {
if ($file !="."
What is the layout of your table, the names of fields etc.
By the way, is it just one table?
If you provide me with this information, I think I will be able to solve
your problem...
// Tobias
""Denis Mettler"" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
( Code at the bottom of the message)
I logged in to a page, using the Curl-extension.
I want to use the vars set in the cookie to continue being logged in and
download another page.
In regular Curl, I need to save the headers, containing the cookie
information, to a file.
In the next step I need
, );
// Tobias
Tobias Talltorp [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
( Code at the bottom of the message)
I logged in to a page, using the Curl-extension.
I want to use the vars set in the cookie to continue being logged in and
download anot
I am interrested in experimenting a bit with FDF, but I use windows, and it
seems that it is only available on Linux... According to Adobe, it should
work on windows aswell, but perhaps not with PHP...
Anyone got it working with windows?
This is what I am talking about:
Is it possible to produce a PDF, use it as a template and populate
predefined sections of it from a database?
The PDFs I want to create are a little too complex for me to produce from
scratch.
// Tobias
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
From what I can understand, I can only use PDI to put PDFs in the
background, not use the actual elements from the PDF?
Example:
I have created a PDF with a table with two cells in one row. The cells have
the text cell1 and cell2.
I run this PDF through the PDI.
Now, can I replace the texts
I would like to tweek the getenv(REMOTE_ADDRESS) a little.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
Sorry about the post before (if there was one)... It was sent by accident.
Here is the complete question:
I would like to tweek the getenv(REMOTE_ADDRESS); a little.
I want my top frame to print the referrer for the frame below.
I'm not sure if this should be done with PHP or javascript. Sounds
From what I could see you want variable variables
$value = $line[0];
$variable = $line[1];
$$variable = $value;
// Tobias
Alain [EMAIL PROTECTED] wrote in message
9dqrh1$23a$[EMAIL PROTECTED]">news:9dqrh1$23a$[EMAIL PROTECTED]...
Hello,
I am trying to get values assigned to variables, by
? In a file outside the
webroot that I can crypt, in a database that I can crypt (can MySQL do
this)?
Thanks in advance,
// Tobias Talltorp
Hello all.
I want multiple domains to be able to read from one cookie, or set one
cookie each for the different domains.
Here is the case:
When the user logs in to my server, I want to set a cookie that has the
value $name=tobias. He specifies which domains that can read this cookie,
I get a strange error when I am trying to send a mail with an attachment.
I used the class below, but I get two error messages.
1. Unknown has generated errors and will be closed by windows...
2.
CGI ERROR
The specified CGI application misbehaved by not returning a complete set of
HTTP headers.
Try this:
http://www.zend.com/codex.php?id=39single=1
Just replace the fopen() and eregi() to suit your needs.
// Tobias
""David Tandberg-Johansen"" [EMAIL PROTECTED] wrote in message
95onrm$dj6$[EMAIL PROTECTED]">news:95onrm$dj6$[EMAIL PROTECTED]...
Hello!
I try to get some information
Hello.
Do you know where I can find a list of all file extensions used today?
Like:
.gif
.htm
.php
.doc
...
Is there an organisation, like ICANN, that decide who can use these file
extensions and what you need to do to register one of your own?
Thanks,
// Tobias
--
PHP General Mailing List
.com/Top/Computers/Data_Formats/
Regards,
Philip
On Wed, 7 Feb 2001, Tobias Talltorp wrote:
No. People use whatever file extensions they like.
So, If I create a 3D-program, I could say that file extensions for this
program will be .pdf (not a prefered extension, but still)?
Is
After a lot of searching on the mailing list and different resources I have
come up with... nothing.
My question:
Can I get the MIME-type of a file using PHP?
(image/gif, text/plain, application/octet-stream, ect.)
Thanks,
// Tobias
--
PHP General Mailing List (http://www.php.net/)
To
Oops, I forgot to mention the most important part...
I need to get the MIME-type (or something that can identify the
file-extension) from a file ALREADY on the server, not posted through a
form.
I.e. How do I get the MIME-type of "tobias.zip" in my folder?
I already know how to get the MIME-type
I am looking into sessions at the moment and havn´t got it all working
properly to continue my journey.
I´m having problem with the session_destroy(), and after some searching in
the archive, I found out that other people have had this problem aswell, but
I didn´t find a fix...
Here is the
Why would you want to create and destroy the session data during a single
request? That simply doesn't make sense - session persistence is designed
to keep registered session data available across _a_series_ requests.
This I know, but it was just to show what I wanted to do.
I believe PHP
I have a problem with the session not using cookies.
The code below doesn´t seem to set a cookie even though my php.ini has it
set.
If I use the header after initializing the session, nothing appears in
getsess.php.
If I click the link on the other hand, the PHPSESSID-variable is added to
the
Just a quick question...
How much data can a session store?
The reason I´m asking is that I have developed a news system and want a
"preview"-thingy and for this I want to store the data in a session. The
main-content can be very large.
Thanks,
// Tobias
--
PHP General Mailing List
Or just adding this to the top of the page that is taking forever to
process:
set_time_limit(60); // 60 seconds before timeout, change to more if you want
to
This way you don´t have to change the time limit for all of the pages.
// Tobias Talltorp
Are you doing a bulk mail out or something
Just a comment...
I tried your code and it worked just fine for me, I could see the session
contents.
The only thing that is different in my setup is that I use PHP 4.03pl1...
Try downgrading and see if it works...
// Tobias
""Schulz, Evan"" [EMAIL PROTECTED] wrote in message
I know this question has been up here before, but all the searches I did
turned up with to many or no hits, so I couldn´t find anything.
I want to get all the variables from a session and get them into an array
like this:
$sessionvar[userid]
$sessionvar[user]
$sessionvar[email]
...
I think I
Does it act as a "normal" array like:
$array = array(one = "Number One", two = "Number Two");
How would I go about to make this loop work (if I use the above array it
works):
while(list($key, $val) = each($HTTP_SESSION_VARS))
echo "$key - $val";
}
Rega
// Get the webpage into a string
$html = join ("", file ("http://www.altavista.com"));
// Using eregi
eregi("title(.*)/title", $html, $tag_contents);
// Using preg_match (faster than eregi)
// The i in the end means that it is a case insensitive match
preg_match("/title(.*)\/title/i", $html,
ster("array");
?
I tried this... Didn't work:
?
session_start();
session_unregister("array[one]");
?
Thanks,
// Tobias Talltorp
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
rewarding aswell:
http://www.php.net/manual/en/ref.pfpro.php
http://www.php.net/manual/en/ref.cybercash.php
I don´t know how much they cost or anything... Anyone who knows?
// Tobias Talltorp
""Tyler Longren"" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news
to read up on regular expressions:
http://www.php.net/manual/en/ref.pcre.php (Faster than ereg)
http://www.php.net/manual/en/ref.regex.php
// Tobias Talltorp
""Joseph Bannon"" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
What is the fu
bias
""Yasuo Ohgaki"" [EMAIL PROTECTED] wrote in message
9bdeag$88r$[EMAIL PROTECTED]">news:9bdeag$88r$[EMAIL PROTECTED]...
You are registered $array as session,
You need to unset() element. I think it should work.
Regards,
--
Yasuo Ohgaki
""Tobias Tallto
$query=mysql_query("Select pass from members where uname='$username'");
$result = mysql_query($query)
or die("You are not authorized to be here.");
?
$query=mysql_query("Select pass from members where uname='$username'");
$result = mysql_query($query);
// If the number of rows is less than
The reason for the fatal error is that you can only store the sessions in
three (or four) ways, files, in a database or in the memory.
What variable has no value?
Have you started the session before you try to access the values?
session_start();
echo $your_value;
(Or preferably)
echo
I need help with a preg-pattern for preg_replace_callback().
I need to match td(+all properties) and replace them with td
id=$counter.
This is as far as I have come in my code:
?php
$html = 'table border=1 id=myTable
tr
td
table border=1
tr
td width=20tabell2 cell1/td
td width=40tabell2
How would I write the pattern for this preg_split()?
/T.*O.*B/, seems to only return the first and last portion of the string
(1: Once upon a time, 2: going for a walk).
$string = Once upon a time T:O.B there was a T.O,B duck who was T-O'B going
for a walk;
$array = preg_split('/T.*O.*B/',
49 matches
Mail list logo