[PHP] POST headers

2001-01-23 Thread Tobias Talltorp
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

[PHP] Verify session in function

2001-03-05 Thread Tobias Talltorp
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";

[PHP] Function, array - problem (probably easy to solve)

2001-03-14 Thread Tobias Talltorp
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

[PHP] creating array on variable variable (bug?)

2001-03-15 Thread Tobias Talltorp
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]

Re: [PHP] FAQ

2001-03-15 Thread Tobias Talltorp
://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

Re: [PHP] creating array on variable variable (bug?)

2001-03-15 Thread Tobias Talltorp
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 {

Re: [PHP] PostToHost

2001-03-15 Thread Tobias Talltorp
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

Re: [PHP] function mail()

2001-03-21 Thread Tobias Talltorp
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

Re: [PHP] addslashes Question

2001-03-21 Thread Tobias Talltorp
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

Re: [PHP] big problem

2001-03-22 Thread Tobias Talltorp
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

[PHP] Register session in function without global?

2001-03-22 Thread Tobias Talltorp
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

Re: [PHP] Register session in function without global?

2001-03-22 Thread Tobias Talltorp
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

Re: [PHP] HELP? HTTP HEADER GURUS etc?

2001-03-23 Thread Tobias Talltorp
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

Re: [PHP] Help with Posting Data

2001-03-28 Thread Tobias Talltorp
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,

Re: [PHP] Help w/ exec() on Win2k, IIS5.

2001-03-29 Thread Tobias Talltorp
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 !="."

Re: [PHP] show mysql_query_result with php

2001-03-29 Thread Tobias Talltorp
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]...

[PHP] Curl: Reuse cookie vars

2002-02-26 Thread Tobias Talltorp
( 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

[PHP] Re: Reuse cookie vars

2002-02-26 Thread Tobias Talltorp
, ); // 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

[PHP] FDF on windows

2002-07-11 Thread Tobias Talltorp
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:

[PHP] using pdf template

2002-07-11 Thread Tobias Talltorp
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:

Re: [PHP] using pdf template

2002-07-12 Thread Tobias Talltorp
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

[PHP] Getting referrer from another frame

2001-05-11 Thread Tobias Talltorp
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]

[PHP] Getting referrer from other frame.

2001-05-11 Thread Tobias Talltorp
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

Re: [PHP] assign values to variables, all taken from txt file

2001-05-15 Thread Tobias Talltorp
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

[PHP] Payflo Pro and credit cards

2001-06-19 Thread Tobias Talltorp
? 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

[PHP] multiple domains using one cookie

2001-07-05 Thread 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,

[PHP] Error on mail attachment

2001-02-05 Thread Tobias Talltorp
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.

Re: [PHP] How to get information out of an external page?

2001-02-07 Thread Tobias Talltorp
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

[PHP] List of all file extensions

2001-02-07 Thread Tobias Talltorp
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

Re: [PHP] List of all file extensions

2001-02-07 Thread Tobias Talltorp
.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

[PHP] Getting MIME-type of file

2001-02-08 Thread Tobias Talltorp
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

Re: [PHP] Getting MIME-type of file

2001-02-08 Thread Tobias Talltorp
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

[PHP] session_destroy() fails...

2001-03-01 Thread Tobias Talltorp
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

Re: [PHP] session_destroy() fails...

2001-03-01 Thread Tobias Talltorp
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

[PHP] session won´t use cookies

2001-03-02 Thread Tobias Talltorp
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

[PHP] how much data can a session store?

2001-04-09 Thread Tobias Talltorp
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

Re: [PHP] sending mail.. PLEASE HELP!

2001-04-12 Thread Tobias Talltorp
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

Re: [PHP] Problem Reading session files

2001-04-12 Thread Tobias Talltorp
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

[PHP] getting all variables from session into array

2001-04-13 Thread Tobias Talltorp
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

Re: [PHP] getting all variables from session into array

2001-04-13 Thread Tobias Talltorp
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

Re: [PHP] Parsing HTML tags

2001-04-13 Thread Tobias Talltorp
// 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,

[PHP] unregister part of array in session

2001-04-15 Thread Tobias Talltorp
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]

Re: [PHP] accepting credit cards

2001-04-15 Thread Tobias Talltorp
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

Re: [PHP] search string

2001-04-15 Thread Tobias Talltorp
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

Re: [PHP] unregister part of array in session

2001-04-16 Thread Tobias Talltorp
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

Re: [PHP] resource id #2

2001-04-16 Thread Tobias Talltorp
$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

Re: [PHP] session variable problem

2001-04-16 Thread Tobias Talltorp
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

[PHP] PREG-pattern, help needed

2003-09-09 Thread Tobias Talltorp
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

[PHP] preg_split() - pattern problem

2002-11-11 Thread Tobias Talltorp
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/',