|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: php-general-digest-help
lists.php.netDate: Thu Oct 11 2001 - 07:33:32 CDT
php-general Digest 11 Oct 2001 12:33:32 -0000 Issue 928
Topics (messages 70746 through 70786):
protecting your php code from other peeping toms?
70746 by: newsgrp.OneGeek.com
70749 by: Christopher William Wesley
70755 by: Jason G.
70765 by: Morten Liebach
Re: Master vs local values in php.ini
70747 by: David Robley
Merging object variables into another class/object.
70748 by: Paul McGarry
Re: What the ?
70750 by: mike cullerton
Re: Export/Import data from local PC MySQL database to remote ISP MySQL database.
70751 by: Ben Holt
Sending Files/SSL
70752 by: Adam.Whitehead.compsm.com.au
problem of nesting includes...
70753 by: Christian Dechery
Returning entire POST
70754 by: Kurt
70757 by: Jason G.
Safe Mode? UID ..???
70756 by: Daniel Roperto
New PHP/MySQL guide & reference!
70758 by: Jason Donald
Error Handling with Netscape
70759 by: Sharat Hegde
70768 by: _lallous
FREE Domain Registrations
70760 by: information.jumptechsolutions.com
70761 by: PHPGalaxy.com
Promo Fêtes d'Enfants
70762 by: info/magicbirthday.com
Re: Send out correct headers for word document
70763 by: Nic Skitt
MySQL: AVG in SELECT
70764 by: Tom Churm
70769 by: _lallous
how to read posted data?
70766 by: ZhiQiang He
70767 by: Niklas Lampén
70772 by: ZhiQiang He
70773 by: Daniel Masur
70774 by: Thomas Buck
70775 by: ZhiQiang He
70777 by: Thomas Buck
70778 by: ZhiQiang He
70780 by: Thomas Buck
70782 by: ZhiQiang He
Interfacing with COBEL
70770 by: Heidi Belal
Re: IE6 and sessions
70771 by: peterdove7846.ukonline.co.uk
Headers, JavaScript & PHP
70776 by: Kamil Nowicki
70781 by: Thomas Buck
70784 by: Kamil Nowicki
70785 by: _lallous
Problems with mcrypt.
70779 by: Toke Herkild
70783 by: Toke Herkild
Weird charactars in output
70786 by: Jeroen Geusebroek
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php-general
lists.php.net
----------------------------------------------------------------------
attached mail follows:
Hi,
First time posting. Did a quick search of the last 300 messages and
couldn't find any help. If there are any FAQs for this newsgroup, I could
take that and check those out.
My question... I want to create some great php code and install it on web
sites for my clients. Now, this code is my property and I'd like to keep it
that way. What are my options for securing this code from other eyes? I
will go into this deeper...
If I have php code sitting in someone's home directory(btw, I am using
linux), they can ftp to get it. Okay, So block FTP, telnet/ssh for that
user.
Now -- how else could that user get a hold of my code? They could exploit
an insecure php script and do a simple 'move *.php *.txt' and simply
retrieve the *.txt via http. However, this would probably be unlikely and
for the most paranoid.
What if even I had to keep FTP running? I could move the top secret PHP
scripts outside of a directory that the user didn't have FTP access to.
However, the user could run his php script from http to do a simple copy
../../*.php to *.txt.
So right now the problem seems to be that PHP code is hard to protect
because it is in plain text. There is a solution to that -- zend optimizer.
I looked into that a bit. Unfortunately it does not fit into the open
source category and is quite expensive (US$2,400.00 -- or maybe I
misunderstood and it is only 24.00 =). So that seems to be out of the
option for most people.
Let's step away from the interpreted languages and move to compiled code.
What are the options for creating compiled code and having that interact
with my PHP scripts that I don't mind others seeing. My compiled code would
be 'some great php[well not php] code' as shown in paragraph two. Compiled
code would be harder for someone to get at with ease. It is good enough for
me to work with. Of course for the most paranoid there are ways to
decompile code, but thats for the more paranoid =].
Basically, I have a bunch of classes I want to secure. PHP is plain text, a
nd that seems to be the insecure part about it. My original question was
going to be on how to get compiled code returning data to calls made from
PHP. For example: returning an array that PHP could understand from a c
program to a PHP script and then to the browser.
Hopefully, all the questinos I brought up and scenerios that were described
will pop some ideas in coder's heads. How do you guys protect code -- if
you do. What are other options that I missed.
Thank you,
Mike Hostetter
attached mail follows:
On Wed, 10 Oct 2001, newsgrp
OneGeek.com wrote:
> My question... I want to create some great php code and install it on web
> sites for my clients. Now, this code is my property and I'd like to keep it
> that way. What are my options for securing this code from other eyes? I
Zend Encoder - http://www.zend.com/store/products/zend-encoder.php
PBC (Beta) - http://pbc.sourceforge.net/
> So right now the problem seems to be that PHP code is hard to protect
> because it is in plain text. There is a solution to that -- zend optimizer.
> I looked into that a bit. Unfortunately it does not fit into the open
> source category and is quite expensive (US$2,400.00 -- or maybe I
Neither does your philosophy of restricting access to your code. The Zend
developers make a good product that you can use to protect your assets.
If your code is worth what you make it out to be, look at the $2,400 as an
investment into yourself and your own code.
> misunderstood and it is only 24.00 =). So that seems to be out of the
> option for most people.
Mostly freeloading people. People who have code they value more than
$2,400 will glady ante up for the investment. People seeking optimization
of encoded PHP will ante up for the investment. Open source developers
who don't worry about that level of optimization don't really have a
reason to have their code encoded. Freeloaders want the Zend Encoder for
free (or cheap) so they can exploit Zend deveopers' code/product to
protect their own.
~Chris /"\
\ / September 11, 2001
X We Are All New Yorkers
/ \ rm -rf /bin/laden
attached mail follows:
How many of your users are going to exploit your code?
What is the worst thing that would happen? some people would buy your code
and then set up a site www.come-get-mikes-great-code-for-free.com? Then
you become a well known programmer, and you make money consulting!
How does MySQL afford to develop such an outstanding product and just
"give" it away, source and all? How about PHP developers.
Besides, I am sure that many competent php developers would be able to take
the functionality of your classes - without looking at the source - and
create ones that work just as well - if not better.
If you want to hide your source from your clients, then go write your own
language, and go from there.
When I was in college, I wanted to cut out some gears from plexiglass in
the engineering lab. I was using AutoCAD 2000 for drawing them and an
Epilog Laser Engraver for the cutting. I went out of the web and found
some AutoLISP scripts for drawing exact gears. They were written for the
previous version of AutoCAD. They did not work (i am sure it was a minor
version issue). I am sure it was a simple error, but NO, they had to go
and encrypt the source code of a free script???? So I got screwed
over. BTW, I ended up drawing my own gears, but WHAT A PAIN.
All I ask is you consider the hard work that all the open source developers
put in for you, before you use their products to do what you are talking about.
Best Regards,
-Jason Garber
IonZoft.com
At 08:25 PM 10/10/2001 -0400, newsgrp
OneGeek.com wrote:
>Hi,
>
>First time posting. Did a quick search of the last 300 messages and
>couldn't find any help. If there are any FAQs for this newsgroup, I could
>take that and check those out.
>
>My question... I want to create some great php code and install it on web
>sites for my clients. Now, this code is my property and I'd like to keep it
>that way. What are my options for securing this code from other eyes? I
>will go into this deeper...
>
>If I have php code sitting in someone's home directory(btw, I am using
>linux), they can ftp to get it. Okay, So block FTP, telnet/ssh for that
>user.
>
>Now -- how else could that user get a hold of my code? They could exploit
>an insecure php script and do a simple 'move *.php *.txt' and simply
>retrieve the *.txt via http. However, this would probably be unlikely and
>for the most paranoid.
>
>What if even I had to keep FTP running? I could move the top secret PHP
>scripts outside of a directory that the user didn't have FTP access to.
>However, the user could run his php script from http to do a simple copy
>../../*.php to *.txt.
>
>So right now the problem seems to be that PHP code is hard to protect
>because it is in plain text. There is a solution to that -- zend optimizer.
>I looked into that a bit. Unfortunately it does not fit into the open
>source category and is quite expensive (US$2,400.00 -- or maybe I
>misunderstood and it is only 24.00 =). So that seems to be out of the
>option for most people.
>
>Let's step away from the interpreted languages and move to compiled code.
>What are the options for creating compiled code and having that interact
>with my PHP scripts that I don't mind others seeing. My compiled code would
>be 'some great php[well not php] code' as shown in paragraph two. Compiled
>code would be harder for someone to get at with ease. It is good enough for
>me to work with. Of course for the most paranoid there are ways to
>decompile code, but thats for the more paranoid =].
>
>Basically, I have a bunch of classes I want to secure. PHP is plain text, a
>nd that seems to be the insecure part about it. My original question was
>going to be on how to get compiled code returning data to calls made from
>PHP. For example: returning an array that PHP could understand from a c
>program to a PHP script and then to the browser.
>
>Hopefully, all the questinos I brought up and scenerios that were described
>will pop some ideas in coder's heads. How do you guys protect code -- if
>you do. What are other options that I missed.
>
>Thank you,
>
>Mike Hostetter
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
>For additional commands, e-mail: php-general-help
lists.php.net
>To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
On 10, Oct, 2001 at 08:25:24PM -0400, newsgrp
OneGeek.com wrote:
...
> If I have php code sitting in someone's home directory(btw, I am using
> linux), they can ftp to get it. Okay, So block FTP, telnet/ssh for that
> user.
If there's any local users having a shell on the machine you basically
can't protect your work. There are lots of localhost exploits in any
system.
It should be a totally dedicated server.
...
> Let's step away from the interpreted languages and move to compiled code.
> What are the options for creating compiled code and having that interact
> with my PHP scripts that I don't mind others seeing. My compiled code would
> be 'some great php[well not php] code' as shown in paragraph two. Compiled
> code would be harder for someone to get at with ease. It is good enough for
> me to work with. Of course for the most paranoid there are ways to
> decompile code, but thats for the more paranoid =].
>
> Basically, I have a bunch of classes I want to secure. PHP is plain text, a
> nd that seems to be the insecure part about it. My original question was
> going to be on how to get compiled code returning data to calls made from
> PHP. For example: returning an array that PHP could understand from a c
> program to a PHP script and then to the browser.
Write CGI script in a compiled language, C, C++ or INTERCAL, and run it
from your PHP scripts.
> Hopefully, all the questinos I brought up and scenerios that were described
> will pop some ideas in coder's heads. How do you guys protect code -- if
> you do. What are other options that I missed.
I think it's a strange thing to do, I think it's bound to end up being
either security through obscurity or a *lot* of extra work for you, none
of which is really smart IMHO.
A totally dedicated server where you have complete control is the only
thing ... and secure code, *always*.
> Thank you,
I hope you found this useful. :-)
Morten
-- Morten Liebach <mortenhotpost.dk> PGP-key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xD796A4EB https://pc89225.stofanet.dk/ || http://pc89225.stofanet.dk/
attached mail follows:
On Thu, 11 Oct 2001 04:23, Eric D Nielsen wrote: > I've changed the include_path variable in php.ini to > where I need it to point. However at some point > something changes the local value away from the master > value and breaks it. There are no php-value/php-admin-value > tags in my httpd.conf file. phpinfo() displays the differing > local and master values so Its nto something my scripts ar > doing. Can anyone tell me where I need to look to see why and > what is causing teh include path to change? > > Eric Nielsen
It might be in a .htaccess file, or it is remotely possible that the php.ini you are modifying is not the one php is using. Check the location in phpinfo().
-- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIANeurotic: Self-taut person.
attached mail follows:
Is there a nice way of merging variables belonging to an object into variables belonging to a class?
For example say I have a class like: ==== class Entry { var $entry_id; var $name; var $description_html; function Entry ($ent_id) { global $conn; $sql= 'SELECT * FROM entry where entry_id='.addslashes($ent_id)." AND live='t'"; $result=pg_exec($conn,$sql); $tmp=pg_fetch_object($result,0); $this->entry_id=$tmp->entry_id; $this->name=$tmp->name; $this->description_html=$tmp->description_html; } ====
having to do all the $this->x=$tmp->x is annoying (in my real example there are considerably more columns).
I'd prefer something like: ==== class Entry { var $entry_id; var $name; var $description_html; function Entry ($ent_id) { global $conn; $sql= 'SELECT * FROM entry where entry_id='.addslashes($ent_id)." AND live='t'"; $result=pg_exec($conn,$sql); oo_merge($this,pg_fetch_object($result,0)); } ====
I guess it's possible to write an oo_merge function in PHP using get_class_vars() and get_object_vars() as appropriate but I was wondering whether this would be generically useful and therefore worth having in the core language?
Paul
attached mail follows:
or,
it's possible this has nothing to do with the code and the umask on the 'problem' directory doesn't give you the permissions you need. you may need to check the permissions.
mike
on 10/10/01 5:40 PM, Chris Lee at lee
mediawaveonline.com wrote:
> ok, here's a story
>
> "when I start my car it works, but when I drive it to another part of town,
> then try and start it, it wont start, why ? "
>
> get the drift, wheres the code ? send us the code snippits and we'll see
> what we can do.
>
> --
>
> Chris Lee
> lee
mediawaveonline.com
>
>
> "Php List" <php_list
ibcnetwork.net> wrote in message
> news:0b6101c151b8$81ecb2d0$01c8c8c8
ibcserver.local...
>> Ok,
>> I don't have a clue what is happening here.
>>
>> I have a script, works perfectly fine.
>> I copy that script to another directory, that script will allways fail
> with
>> a segmentation fault(11).
>>
>> What is going on? Why would it suddenly not work? There is nothing
> directory
>> specific about the script, I can copy it to a different dir again and
>> suddenly it will work in that dir.
>>
>> ARRRRGGHHHHHHH!
>>
>
>
-- mike cullerton
attached mail follows:
>>Should I give up?
Perish the thought! ;-).
> try: > mysqldump $database $table |mysql -uuser -ppass -hhost
This is the correct way to do it, but it's likely a little confusing to a newbie and won't work in all situations depending on the server configuration so I'm going to try elaborating a bit...
First you need to dump your current data from your local MySQL db. mysqldump is the tool for the job, or you can use PHPMyAdmin if you have it installed locally.
1) Dumping your data
Using mysqldump:
$ mysqldump -c -u username -p databasename > outputfilename
'-c' will dump the database structure and all data. This way the database tables, their structure, and the data will be inluded in the output file.
'-u' should be followed by the username that has access to your local MySQL database
'-p' causes mysqldump to prompt for the user's password
'databasename' is the name of the database being dumped
'> outputfilename' directs the output of mysqldump to the file 'outputfilename'.
Using PHPMyAdmin:
Log into PHPMyAdmin and navigate to the main page for the database in question (ie click on it's name in the left frame). In the main window there should be the option to 'View dump (schema) of database'. Select the 'Structure and data' radio button and the 'Complete inserts' check box, then click 'Go'. You should now see a 'dump' of your database in the main frame of PHPMyAdmin (this is the same data that is created using mysqldump). Copy and paste everything from this screen (except for the highlighted title at the top of the screen) into a text file.
2) Importing your data to the remote MySQL server
Using the command line:
In order to import the data via the command line you must either have shell access on the remote machine or the remote MySQL server must be configured to allow your local machine to access it.
From a shell on your local machine:
$ mysql -u username -p -h remotehostname databasename < outputfilename
'-h' is followed by the host name of the remote MySQL server, the other switches have the same meaning as before.
'< outputfilename' is the name (and path if necessary) to the file that was created using mysqldump (or PHPMyAdmin) previously. The less than sign means that we are reading from 'outputfilename', whereas earlier the greater than sign mean that we were writing to the file.
From a shell on the remote machine:
First you have to copy your outputfile from the earlier mysqldump (or PHPMyAdmin) step to the remote machine. scp or ftp should do the trick. Once you've got your outputfile on the remote machine:
$ mysql -u username -p databasename < outputfilename
Basically this is the same as when it is done remotely, except without the -h switch.
Using PHPMyAdmin:
Log into PHPMyAdmin and if it has not already been created, create the database (but not the tables or their structure). Click on the database's name in the left frame.
In the main frame find the 'Run SQL query/queries on database databasename window. Below it you will see 'or Location of the textfile:'. Click on the 'Browse' button next to the form field and navigate to the output file created with mysqldump or PHPMyAdmin in the first step. Click 'Go'.
3) Open beer. Consume. Repeat :-).
I hope this helps. If you're stuck feel free to email, just remove the spam stuff from my addy.
BTW, what the first person suggested would work as long as the remote MySQL db server is configured to allow connections from your remote machine.
- Ben
attached mail follows:
Greetings-
I'm currently working on a PHP script which passes file data through from the filesystem to the webbrowser. This is used for the purpose of sending files that exist outside the web root.
Generally this is a simple process-- opening the file and using the fpassthru command.
I have this working correctly. However ,the entire site is now using SSL and the script no longer functions. i.e.
http://www.myserver.com/sendfile.php?file=/whatever/whatever.doc
works without a problem but once the protocol changes to:
https://www.myserver.com/sendfile.php?file=/whatever/whatever.doc
it fails.
What am I missing that prevents me from allowing this script to work with SSL?
Thanks.
Regards, Adam Whitehead
attached mail follows:
We ran a serious thread about "nested includes()" and I saw a lot of pseudo-solutions...
and I've just implemented one of them which I think is the best... but while I was doing it I realised it is more 'pseudo' than I tought... it worked finally.... but this is what I've figured:
MAIN INCLUDE PROBLEM: - if a file "a" includes "b" and "b" includes "c"... "c" won't have a path relative to "b"... so it won't work... (unless of course they are all in the same dir)
there's no 100% safe solution to work around nested includes with PHP... right? there's no way you can assure in every file, that includes another and another (and so on) in different dirs... that it's allways safe and you won't run into the MAIN INCLUDE PROBLEM.... and if you want to change some dir you will ever have to go through every file and change something...
well... my pseudo-solution was: if I had: /vitrine /vitrine/adm /vitrine/include /vitrine/templates
and in all these dirs I had files that can - or not - include files, and the includes also include more files... and so on... so I've placed a file called "include.conf.php" in /vitrine... and it should ALWAYS stay there (or at the bottom dir anyway)... so all I have to do is require() it in every single .php file I have... this file defines something like INC_DIR that can be added to any call to include or require... and this INC_DIR is the actual DIR not www absolute or relative...
but I can only require("include.conf.php") on what I like to call TOP files... I mean... files that cannot be include()ed... or the whole thing won't work anymore... which for now is no problem... but I'm sure I'll have problems with this in the future...
_____________________________ . Christian Dechery . . Gaita-L Owner / Web Developer . . http://www.webstyle.com.br . . http://www.tanamesa.com.br
attached mail follows:
Using PHP on an Apache server, how do I capture and forward the entire contents of a POST exactly as it came in. Those familiar with paypal know that they offer the "Instant Payment Notification" where the paypal server will submit (to a predetermined page on your server) a POST containing all the variables and values of the paypal transaction. Instant Payment Notification then requires the page to return the entire POST exactly as it is received with one extra key/value on the end of it (for validation of information contained).
What I'm looking for is something similar to the $QUERY_STRING or something to that nature. I can break apart the POST using $HTTP_POST_VARS and then re-assemble it as a string and then URL encode it, but I'm not guaranteed that it is EXACTLY like the original.
Any ideas? Anyone ever used PHP for the PayPal Instant Payment Notification script?
Thanks in advance, Kurt
attached mail follows:
you can serialize the entire array $HTTP_POST_VARS, then urlencode() it, and pass it wherever.
you could also mcrypt() it after serialize() and then urlencode() it and then pass it wherever. This way, the contents would be more secure.
Also, you could just use base64_encode() - less secure, but completely unreadable by the human eye.
$datatogo = urlencode(base64_encode(serialize($HTTP_POST_VARS)));
$aPostVars = unserialize(base64_decode(urldecode($incoming_data)));
http://www.php.net/manual/en/function.serialize.php http://www.php.net/manual/en/function.unserialize.php
http://www.php.net/manual/en/function.urlencode.php http://www.php.net/manual/en/function.urldecode.php
http://www.php.net/manual/en/ref.mcrypt.php
http://www.php.net/manual/en/function.base64-encode.php http://www.php.net/manual/en/function.base64-decode.php
-Jason Garber IonZoft.com
At 09:19 PM 10/10/2001 -0500, Kurt wrote:
>Using PHP on an Apache server, how do I capture and forward the entire
>contents of a POST exactly as it came in. Those familiar with paypal know
>that they offer the "Instant Payment Notification" where the paypal server
>will submit (to a predetermined page on your server) a POST containing all
>the variables and values of the paypal transaction. Instant Payment
>Notification then requires the page to return the entire POST exactly as it
>is received with one extra key/value on the end of it (for validation of
>information contained).
>
>What I'm looking for is something similar to the $QUERY_STRING or something
>to that nature. I can break apart the POST using $HTTP_POST_VARS and then
>re-assemble it as a string and then URL encode it, but I'm not guaranteed
>that it is EXACTLY like the original.
>
>Any ideas? Anyone ever used PHP for the PayPal Instant Payment Notification
>script?
>
>Thanks in advance,
>Kurt
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
>For additional commands, e-mail: php-general-help
lists.php.net
>To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
I am with some problems, my ISP enabled SAFE MODE and all my scripts are with problems... i made an example for testing ... if u can help me make the example work, i can make the site work again :)
index.php ---- BEGIN --- <PRE> <? $dir = 'a';
echo 'umask: '.umask(0000)."\n"; echo 'umask: '.umask(0000)."\n\n";
echo "make dir '".$dir."'...\n"; echo mkdir($dir,0777)."\n\n";
echo "copy 'index.php' to '".$dir."'...\n"; echo copy('index.php',$dir.'/index.php')."\n\n";
echo "del '".$dir."/index.php'...\n"; echo unlink($dir.'/index.php')."\n\n";
echo "remove '".$dir."'...\n"; echo rmdir($dir)."\n\n"; ?> --- END ---
Running (answer) ---BEGIN --- umask: 18 umask: 0
make dir 'a'... 1
copy 'index.php' to 'a'... 1
del 'a/index.php'...
Warning: SAFE MODE Restriction in effect. The script whose uid is 3032 is not allowed to access a/index.php owned by uid 65534 in /www/belo18/public_html/teste/index.php on line 15
remove 'a'...
Warning: RmDir failed (Directory not empty) in /www/belo18/public_html/teste/index.php on line 18 --- END --- </PRE> Daniel Roperto (48) 9992-4092
attached mail follows:
Hello fellow PHPers,
I hope you don't mind this brief message on the grounds that we are doing our best to help PHP take over the world!
Some of you may have seen the extensive PHP and MySQL tutorial published writen by Kevin Yank of SitePoint.com. Yes? No? Maybe?
If you missed it, you can read the shortened online version of the tutorial at: http://www.sitepoint.com/article.php/228
At the request of many of our readers, Kevin has taken this tutorial, completely revisited and extended it, and it's now available as a soft-cover book titled "Build Your Own Database Driven Website Using PHP & MySQL".
In this book Kevin shows you how to:
- Build a working Content Management System - Add, edit & delete Web content without using HTML - Setup automatic backups of your database - Increase your database security - Optimize the loading time of your Website - Build an ecommerce shopping cart - Automatically send email on triggered events - Handle file uploads using HTML forms - Build a Web-based file repository or photo gallery - Utilize sessions and cookies to track site visitors - Master MySQL Database Administration. - And a whole lot more...
Plus you also gain access to an online archive containing all the code samples used in the book. This is huge head start given the useful applications that Kevin shows you how to build in the book.
In order to keep food and drink in Kevin's fridge so that he can continue to write amazing tutorials, get your copy of his book NOW!
http://sitepoint.com/books/?bookid=Book-Details
Jason. ___________________________________
Jason Donald Co-Founder SitePoint - Master the Web
e: jason
sitepoint.com
w: www.sitepoint.com
p: +613 9495 6600
f: +613 9495 6611
___________________________________
attached mail follows:
Hello,
In my PHP program, I have some processing to display items in a loop which is interspersed inside the Body of the HTML page. While doing this processing, if an error message comes up I "die" with the error message (Displays error message and quits).
The error handling works fine on Internet Explorer but shows a blank page in Netscape. I figured out that this is probably because all the HTML tags do not have corresponding end tags. So I tried outputting "</body></html>" before the "die" statement in the error handler. This did not seem to make a difference as there are still some open table tags, etc, ... which do not have correponding end tags.
How do I get the error message to print on Netscape? Doing all the error handling before the HTML starts is too much of a problem as I have to duplicate code.
Regards, Sharat
attached mail follows:
try a javascript work around, which will clear the page and write the error (when it occurs)
<script language="JavaScript">window.onload = new Function('document.close();document.open();document.write("error occured: msg msg msg!");');</script>
"Sharat Hegde" <shah
sonata-software.com> wrote in message
news:30402B4CB8C7D311A3C600C04F1513BCB4F611
bg2ipmail...
> Hello,
>
> In my PHP program, I have some processing to display items in a loop which
> is interspersed inside the Body of the HTML page. While doing this
> processing, if an error message comes up I "die" with the error message
> (Displays error message and quits).
>
> The error handling works fine on Internet Explorer but shows a blank page
in
> Netscape. I figured out that this is probably because all the HTML tags
do
> not have corresponding end tags. So I tried outputting "</body></html>"
> before the "die" statement in the error handler. This did not seem to make
a
> difference as there are still some open table tags, etc, ... which do not
> have correponding end tags.
>
> How do I get the error message to print on Netscape? Doing all the error
> handling before the HTML starts is too much of a problem as I have to
> duplicate code.
>
> Regards,
> Sharat
>
attached mail follows:
FREE Domain Registrations are being given away!
Get your own FREE .com, .net, or .org address now. Visit http://www.jumptechsolutions.com/information
You or someone you know has enrolled this email address on this mailing list. If this was sent to you in error, please reply to this email with "REMOVE" in the subject line.
attached mail follows:
wow! now if *I* were to spam a mailing list, I would at least make it a little less obvious...like maybe put my domain name as my real name in outgoing mail or something. =)
information
jumptechsolutions.com wrote:
> FREE Domain Registrations are being given away!
>
> Get your own FREE .com, .net, or .org address now.
> Visit http://www.jumptechsolutions.com/information
>
> You or someone you know has enrolled this email address on this mailing list.
> If this was sent to you in error, please reply to this email with "REMOVE" in the subject line.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
-- - Tim PHP Galaxy: http://www.phpgalaxy.com/ The LavaWarp Engine: http://www.phpgalaxy.com/engine.php3 BitSearch: http://www.phpgalaxy.com/bitsearch.php3 MetaWarp: http://www.phpgalaxy.com/metawarp.php3 PhotoRate: http://www.phpgalaxy.com/photorate.php3 Earn $10 per order selling these scripts on your site! http://www.phpgalaxy.com/aff/
attached mail follows:
Bonjour,
Je suis Poupy la créatrice du site Magicbirthday.com, je me permets de vous écrire aujourd'hui pour vous parler des dernières nouveautés :
- La baisse des prix de nos coffrets au passage à l'Euro.
- L'arrivée de nouveaux thèmes : Oui - Oui, Super Nanas et Scream pour fêter Halloween.
- La promotion BINGO118 : Pour toute commande vous recevrez un jeu de Bingo en signalant votre Code Promo BINGO118 sur votre formulaire de commande.
En espérant vous voir bientôt sur notre site Magicbirthday.com et contribuer à la magie des fêtes de vos enfants.
Service Clients Magicbirthday.com
Si vous ne souhaitez pas être informés de nouveautés, renvoyez nous ce message en indiquant dans l'objet : annulation 118 et indiquez l'adresse e-mail sur laquelle vous avez reçu notre message.
attached mail follows:
FYI,
There is a typo in the MS stuff for attachments:
header( "Content-type: application/msword" ); header( "Content-Disposition: atachment; filename=cv-984.doc" ); header( "Content-Description: Word CV Document" ); readfile ($tmp);
notice the single t instead of 2 t's in atachment. That was what was wrong. Works like a charm now :)
Thanks for all your help!
Nic
"Nic Skitt" <nic
nicskitt.co.uk> wrote in message
news:20011010131615.78485.qmail
pb1.pair.com...
> BTW I have just revised the application name after checking the headers of
a
> genuine word doc loaded via a browser and it is msword not ms-word. Still
no
> effect :(
>
>
attached mail follows:
hi,
i have a select statement to give me the averages for various mysql columns. for one of the columns, i need to take the average for only those fields where the content !='6' (with 6 being a Flag telling me to exclude it). so i came up with the following select statement, which returns no mysql_error, but does not return the correct figure for the AVG:
SELECT AVG(q1), AVG(q2), AVG(q3), AVG(q4), AVG(q5), AVG(q6), AVG(q7), AVG(q8), AVG(q11), AVG(q16), AVG(q18!='6') FROM hr_form2 WHERE Answer != 0
from this i should get a return of something like this, since NONE of my fields in column q18 contain a '6':
AVG(q18) = 2.7143
instead, i get this:
AVG(q18) = 1.0000
could someone please tell me--is there a logical error in my thinking here? i want to select the AVG from q18 ONLY for those fields where q18!=6 : for those fields where q18=6, I just want it left out of the AVG.
there's definitely a better way to formulate my sql, right?
muchos gracias,
tom
attached mail follows:
first of all, when you do AVG(q18!='6') it will make the AVG of either TRUE=1, FALSE=0 maybe if you select q18, and AVG(q18) and when using the result query you decide from your PHP code whether to refer to the average or to its value... example:
$result = mysql_query(" SELECT AVG(q1), AVG(q2), AVG(q3), AVG(q4), AVG(q5), AVG(q6), AVG(q7), AVG(q8), AVG(q11), AVG(q16), AVG(q18) as avg_q18,q18 FROM hr_form2 WHERE Answer != 0");
<? while ($row=mysql_fetch_Array($result)) { if ($row['q18']==6) $value = $row['avg_q18']; else $value = $row['q18']; } ?>
hope it helps...
"Tom Churm" <thomas.churm
pixelpark.com> wrote in message
news:3BC5619E.8806F6F1
pixelpark.com...
> hi,
>
> i have a select statement to give me the averages for various mysql
> columns. for one of the columns, i need to take the average for only
> those fields where the content !='6' (with 6 being a Flag telling me
> to exclude it). so i came up with the following
> select statement, which returns no mysql_error, but does not return the
> correct figure for the AVG:
>
> SELECT AVG(q1), AVG(q2), AVG(q3), AVG(q4), AVG(q5), AVG(q6), AVG(q7),
> AVG(q8), AVG(q11), AVG(q16), AVG(q18!='6') FROM hr_form2 WHERE Answer !=
> 0
>
> from this i should get a return of something like this, since NONE of my
> fields in column q18 contain a '6':
>
> AVG(q18) = 2.7143
>
> instead, i get this:
>
> AVG(q18) = 1.0000
>
> could someone please tell me--is there a logical error in my thinking
> here? i want to select the AVG from q18 ONLY for those fields where
> q18!=6 : for those fields where q18=6, I just want it left out of the
> AVG.
>
> there's definitely a better way to formulate my sql, right?
>
> muchos gracias,
>
> tom
attached mail follows:
we want to use post data in php, how can we read it? note, this post data is not sent by form. thanks in advance, ^_^
attached mail follows:
Use $FieldName or $HTTP_POST_VARS.
Niklas
-----Original Message-----
From: ZhiQiang He [mailto:hhzqq
21cn.com]
Sent: 11. lokakuuta 2001 12:54
To: php-general
lists.php.net
Subject: [PHP] how to read posted data?
we want to use post data in php, how can we read it? note, this post data is not sent by form. thanks in advance, ^_^
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
you misunderstanded, i mean this post data is not sent by form.
On Thu, 11 Oct 2001 12:58:09 +0300, niklas.lists
publico.fi
(=?Iso-8859-1?Q?Niklas_lamp=E9n?=) wrote:
>Use $FieldName or $HTTP_POST_VARS.
>
>
>Niklas
>
>-----Original Message-----
>From: ZhiQiang He [mailto:hhzqq
21cn.com]
>Sent: 11. lokakuuta 2001 12:54
>To: php-general
lists.php.net
>Subject: [PHP] how to read posted data?
>
>
>we want to use post data in php, how can we read it?
>note, this post data is not sent by form.
>thanks in advance, ^_^
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
>For additional commands, e-mail: php-general-help
lists.php.net To
>contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
i think posting data by form is the only way, except u put it in the url string...
or?
"Zhiqiang He" <hhzqq
21cn.com> schrieb im Newsbeitrag
news:3bc58384.14918962
news.php.net...
> you misunderstanded, i mean this post data is not sent by form.
>
> On Thu, 11 Oct 2001 12:58:09 +0300, niklas.lists
publico.fi
> (=?Iso-8859-1?Q?Niklas_lamp=E9n?=) wrote:
>
> >Use $FieldName or $HTTP_POST_VARS.
> >
> >
> >Niklas
> >
> >-----Original Message-----
> >From: ZhiQiang He [mailto:hhzqq
21cn.com]
> >Sent: 11. lokakuuta 2001 12:54
> >To: php-general
lists.php.net
> >Subject: [PHP] how to read posted data?
> >
> >
> >we want to use post data in php, how can we read it?
> >note, this post data is not sent by form.
> >thanks in advance, ^_^
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> >For additional commands, e-mail: php-general-help
lists.php.net To
> >contact the list administrators, e-mail: php-list-admin
lists.php.net
> >
>
attached mail follows:
If it's posted data, why can't you access it from $HTTP_POST_VARS ?
i.e. you've posted a variable called "name", you can access it from $HTTP_POST_VARS["name"]
Thomas.
At 11:34 11/10/01 +0000, ZhiQiang He wrote:
>you misunderstanded, i mean this post data is not sent by form.
>
>On Thu, 11 Oct 2001 12:58:09 +0300, niklas.lists
publico.fi
>(=?Iso-8859-1?Q?Niklas_lamp=E9n?=) wrote:
>
> >Use $FieldName or $HTTP_POST_VARS.
> >
> >
> >Niklas
> >
> >-----Original Message-----
> >From: ZhiQiang He [mailto:hhzqq
21cn.com]
> >Sent: 11. lokakuuta 2001 12:54
> >To: php-general
lists.php.net
> >Subject: [PHP] how to read posted data?
> >
> >
> >we want to use post data in php, how can we read it?
> >note, this post data is not sent by form.
> >thanks in advance, ^_^
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> >For additional commands, e-mail: php-general-help
lists.php.net To
> >contact the list administrators, e-mail: php-list-admin
lists.php.net
> >
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
>For additional commands, e-mail: php-general-help
lists.php.net
>To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
example: you post an xml string to server php file, but not use form.
On Thu, 11 Oct 2001 12:41:13 +0100, tom
localeyes-uk.com (Thomas Buck)
wrote:
>
>If it's posted data, why can't you access it from $HTTP_POST_VARS ?
>
>i.e. you've posted a variable called "name", you can access it from
>$HTTP_POST_VARS["name"]
>
>Thomas.
>
>At 11:34 11/10/01 +0000, ZhiQiang He wrote:
>>you misunderstanded, i mean this post data is not sent by form.
>>
>>On Thu, 11 Oct 2001 12:58:09 +0300, niklas.lists
publico.fi
>>(=?Iso-8859-1?Q?Niklas_lamp=E9n?=) wrote:
>>
>> >Use $FieldName or $HTTP_POST_VARS.
>> >
>> >
>> >Niklas
>> >
>> >-----Original Message-----
>> >From: ZhiQiang He [mailto:hhzqq
21cn.com]
>> >Sent: 11. lokakuuta 2001 12:54
>> >To: php-general
lists.php.net
>> >Subject: [PHP] how to read posted data?
>> >
>> >
>> >we want to use post data in php, how can we read it?
>> >note, this post data is not sent by form.
>> >thanks in advance, ^_^
>> >
>> >--
>> >PHP General Mailing List (http://www.php.net/)
>> >To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
>> >For additional commands, e-mail: php-general-help
lists.php.net To
>> >contact the list administrators, e-mail: php-list-admin
lists.php.net
>> >
>>
>>
>>--
>>PHP General Mailing List (http://www.php.net/)
>>To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
>>For additional commands, e-mail: php-general-help
lists.php.net
>>To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
attached mail follows:
Yes, I'm not disputing that... all I'm asking is why you can't use $HTTP_POST_VARS ? If you post data to a PHP script using whatever post method you prefer, the variables should be in $HTTP_POST_VARS.
Double check the $HTTP_POST_VARS... something like
foreach($HTTP_POST_VARS as $key => $value) { echo "$key : $value<br>"; }
should do the trick.
Thomas.
>example: you post an xml string to server php file, but not use form.
>
>On Thu, 11 Oct 2001 12:41:13 +0100, tom
localeyes-uk.com (Thomas Buck)
>wrote:
>
> >
> >If it's posted data, why can't you access it from $HTTP_POST_VARS ?
> >
> >i.e. you've posted a variable called "name", you can access it from
> >$HTTP_POST_VARS["name"]
> >
> >Thomas.
> >
> >At 11:34 11/10/01 +0000, ZhiQiang He wrote:
> >>you misunderstanded, i mean this post data is not sent by form.
> >>
> >>On Thu, 11 Oct 2001 12:58:09 +0300, niklas.lists
publico.fi
> >>(=?Iso-8859-1?Q?Niklas_lamp=E9n?=) wrote:
> >>
> >> >Use $FieldName or $HTTP_POST_VARS.
> >> >
> >> >
> >> >Niklas
> >> >
> >> >-----Original Message-----
> >> >From: ZhiQiang He [mailto:hhzqq
21cn.com]
> >> >Sent: 11. lokakuuta 2001 12:54
> >> >To: php-general
lists.php.net
> >> >Subject: [PHP] how to read posted data?
> >> >
> >> >
> >> >we want to use post data in php, how can we read it?
> >> >note, this post data is not sent by form.
> >> >thanks in advance, ^_^
> >> >
> >> >--
> >> >PHP General Mailing List (http://www.php.net/)
> >> >To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> >> >For additional commands, e-mail: php-general-help
lists.php.net To
> >> >contact the list administrators, e-mail: php-list-admin
lists.php.net
> >> >
> >>
> >>
> >>--
> >>PHP General Mailing List (http://www.php.net/)
> >>To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> >>For additional commands, e-mail: php-general-help
lists.php.net
> >>To contact the list administrators, e-mail: php-list-admin
lists.php.net
> >
> >
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
>For additional commands, e-mail: php-general-help
lists.php.net
>To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
i post data like this:
<? $ch=curl_init("http://localhost/learning/php/test/curl/receive_post_data.php"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, "this is posted data"); curl_exec($ch); curl_close($ch); ?>
On Thu, 11 Oct 2001 12:49:17 +0100, tom
localeyes-uk.com (Thomas Buck)
wrote:
>
>Yes, I'm not disputing that... all I'm asking is why you can't use
>$HTTP_POST_VARS ? If you post data to a PHP script using whatever post
>method you prefer, the variables should be in $HTTP_POST_VARS.
>
>Double check the $HTTP_POST_VARS... something like
>
>foreach($HTTP_POST_VARS as $key => $value) {
> echo "$key : $value<br>";
>}
>
>should do the trick.
>
>Thomas.
>
>>example: you post an xml string to server php file, but not use form.
>>
>>On Thu, 11 Oct 2001 12:41:13 +0100, tom
localeyes-uk.com (Thomas Buck)
>>wrote:
>>
>> >
>> >If it's posted data, why can't you access it from $HTTP_POST_VARS ?
>> >
>> >i.e. you've posted a variable called "name", you can access it from
>> >$HTTP_POST_VARS["name"]
>> >
>> >Thomas.
>> >
>> >At 11:34 11/10/01 +0000, ZhiQiang He wrote:
>> >>you misunderstanded, i mean this post data is not sent by form.
>> >>
>> >>On Thu, 11 Oct 2001 12:58:09 +0300, niklas.lists
publico.fi
>> >>(=?Iso-8859-1?Q?Niklas_lamp=E9n?=) wrote:
>> >>
>> >> >Use $FieldName or $HTTP_POST_VARS.
>> >> >
>> >> >
>> >> >Niklas
>> >> >
>> >> >-----Original Message-----
>> >> >From: ZhiQiang He [mailto:hhzqq
21cn.com]
>> >> >Sent: 11. lokakuuta 2001 12:54
>> >> >To: php-general
lists.php.net
>> >> >Subject: [PHP] how to read posted data?
>> >> >
>> >> >
>> >> >we want to use post data in php, how can we read it?
>> >> >note, this post data is not sent by form.
>> >> >thanks in advance, ^_^
>> >> >
>> >> >--
>> >> >PHP General Mailing List (http://www.php.net/)
>> >> >To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
>> >> >For additional commands, e-mail: php-general-help
lists.php.net To
>> >> >contact the list administrators, e-mail: php-list-admin
lists.php.net
>> >> >
>> >>
>> >>
>> >>--
>> >>PHP General Mailing List (http://www.php.net/)
>> >>To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
>> >>For additional commands, e-mail: php-general-help
lists.php.net
>> >>To contact the list administrators, e-mail: php-list-admin
lists.php.net
>> >
>> >
>>
>>
>>--
>>PHP General Mailing List (http://www.php.net/)
>>To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
>>For additional commands, e-mail: php-general-help
lists.php.net
>>To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
attached mail follows:
You're using the line "curl_setopt($ch, CURLOPT_POSTFIELDS, "this is posted data");" incorrectly.
To post a few variables, the option needs to take the form
"variable=value&anotherVariable=anotherValue"
e.g.
curl_setopt($ch, CURLOPT_POSTFIELDS, "variable=value&anotherVariable=anotherValue");
Thomas.
><?
>$ch=curl_init("http://localhost/learning/php/test/curl/receive_post_data.php");
>curl_setopt($ch, CURLOPT_POST, 1);
>curl_setopt($ch, CURLOPT_POSTFIELDS, "this is posted data");
>curl_exec($ch);
>curl_close($ch);
>?>
>
>On Thu, 11 Oct 2001 12:49:17 +0100, tom
localeyes-uk.com (Thomas Buck)
>wrote:
>
> >
> >Yes, I'm not disputing that... all I'm asking is why you can't use
> >$HTTP_POST_VARS ? If you post data to a PHP script using whatever post
> >method you prefer, the variables should be in $HTTP_POST_VARS.
> >
> >Double check the $HTTP_POST_VARS... something like
> >
> >foreach($HTTP_POST_VARS as $key => $value) {
> > echo "$key : $value<br>";
> >}
> >
> >should do the trick.
> >
> >Thomas.
> >
> >>example: you post an xml string to server php file, but not use form.
> >>
> >>On Thu, 11 Oct 2001 12:41:13 +0100, tom
localeyes-uk.com (Thomas Buck)
> >>wrote:
> >>
> >> >
> >> >If it's posted data, why can't you access it from $HTTP_POST_VARS ?
> >> >
> >> >i.e. you've posted a variable called "name", you can access it from
> >> >$HTTP_POST_VARS["name"]
> >> >
> >> >Thomas.
> >> >
> >> >At 11:34 11/10/01 +0000, ZhiQiang He wrote:
> >> >>you misunderstanded, i mean this post data is not sent by form.
> >> >>
> >> >>On Thu, 11 Oct 2001 12:58:09 +0300, niklas.lists
publico.fi
> >> >>(=?Iso-8859-1?Q?Niklas_lamp=E9n?=) wrote:
> >> >>
> >> >> >Use $FieldName or $HTTP_POST_VARS.
> >> >> >
> >> >> >
> >> >> >Niklas
> >> >> >
> >> >> >-----Original Message-----
> >> >> >From: ZhiQiang He [mailto:hhzqq
21cn.com]
> >> >> >Sent: 11. lokakuuta 2001 12:54
> >> >> >To: php-general
lists.php.net
> >> >> >Subject: [PHP] how to read posted data?
> >> >> >
> >> >> >
> >> >> >we want to use post data in php, how can we read it?
> >> >> >note, this post data is not sent by form.
> >> >> >thanks in advance, ^_^
> >> >> >
> >> >> >--
> >> >> >PHP General Mailing List (http://www.php.net/)
> >> >> >To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> >> >> >For additional commands, e-mail: php-general-help
lists.php.net To
> >> >> >contact the list administrators, e-mail: php-list-admin
lists.php.net
> >> >> >
> >> >>
> >> >>
> >> >>--
> >> >>PHP General Mailing List (http://www.php.net/)
> >> >>To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> >> >>For additional commands, e-mail: php-general-help
lists.php.net
> >> >>To contact the list administrators, e-mail: php-list-admin
lists.php.net
> >> >
> >> >
> >>
> >>
> >>--
> >>PHP General Mailing List (http://www.php.net/)
> >>To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> >>For additional commands, e-mail: php-general-help
lists.php.net
> >>To contact the list administrators, e-mail: php-list-admin
lists.php.net
> >
> >
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
>For additional commands, e-mail: php-general-help
lists.php.net
>To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
and i wonder why we can not post data without name?
On Thu, 11 Oct 2001 12:58:37 +0100, tom
localeyes-uk.com (Thomas Buck)
wrote:
>
>You're using the line "curl_setopt($ch, CURLOPT_POSTFIELDS, "this is posted
>data");" incorrectly.
>
>To post a few variables, the option needs to take the form
>
>"variable=value&anotherVariable=anotherValue"
>
>e.g.
>
>curl_setopt($ch, CURLOPT_POSTFIELDS,
>"variable=value&anotherVariable=anotherValue");
>
>Thomas.
>
>><?
>>$ch=curl_init("http://localhost/learning/php/test/curl/receive_post_data.php");
>>curl_setopt($ch, CURLOPT_POST, 1);
>>curl_setopt($ch, CURLOPT_POSTFIELDS, "this is posted data");
>>curl_exec($ch);
>>curl_close($ch);
>>?>
>>
>>On Thu, 11 Oct 2001 12:49:17 +0100, tom
localeyes-uk.com (Thomas Buck)
>>wrote:
>>
>> >
>> >Yes, I'm not disputing that... all I'm asking is why you can't use
>> >$HTTP_POST_VARS ? If you post data to a PHP script using whatever post
>> >method you prefer, the variables should be in $HTTP_POST_VARS.
>> >
>> >Double check the $HTTP_POST_VARS... something like
>> >
>> >foreach($HTTP_POST_VARS as $key => $value) {
>> > echo "$key : $value<br>";
>> >}
>> >
>> >should do the trick.
>> >
>> >Thomas.
>> >
>> >>example: you post an xml string to server php file, but not use form.
>> >>
>> >>On Thu, 11 Oct 2001 12:41:13 +0100, tom
localeyes-uk.com (Thomas Buck)
>> >>wrote:
>> >>
>> >> >
>> >> >If it's posted data, why can't you access it from $HTTP_POST_VARS ?
>> >> >
>> >> >i.e. you've posted a variable called "name", you can access it from
>> >> >$HTTP_POST_VARS["name"]
>> >> >
>> >> >Thomas.
>> >> >
>> >> >At 11:34 11/10/01 +0000, ZhiQiang He wrote:
>> >> >>you misunderstanded, i mean this post data is not sent by form.
>> >> >>
>> >> >>On Thu, 11 Oct 2001 12:58:09 +0300, niklas.lists
publico.fi
>> >> >>(=?Iso-8859-1?Q?Niklas_lamp=E9n?=) wrote:
>> >> >>
>> >> >> >Use $FieldName or $HTTP_POST_VARS.
>> >> >> >
>> >> >> >
>> >> >> >Niklas
>> >> >> >
>> >> >> >-----Original Message-----
>> >> >> >From: ZhiQiang He [mailto:hhzqq
21cn.com]
>> >> >> >Sent: 11. lokakuuta 2001 12:54
>> >> >> >To: php-general
lists.php.net
>> >> >> >Subject: [PHP] how to read posted data?
>> >> >> >
>> >> >> >
>> >> >> >we want to use post data in php, how can we read it?
>> >> >> >note, this post data is not sent by form.
>> >> >> >thanks in advance, ^_^
>> >> >> >
>> >> >> >--
>> >> >> >PHP General Mailing List (http://www.php.net/)
>> >> >> >To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
>> >> >> >For additional commands, e-mail: php-general-help
lists.php.net To
>> >> >> >contact the list administrators, e-mail: php-list-admin
lists.php.net
>> >> >> >
>> >> >>
>> >> >>
>> >> >>--
>> >> >>PHP General Mailing List (http://www.php.net/)
>> >> >>To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
>> >> >>For additional commands, e-mail: php-general-help
lists.php.net
>> >> >>To contact the list administrators, e-mail: php-list-admin
lists.php.net
>> >> >
>> >> >
>> >>
>> >>
>> >>--
>> >>PHP General Mailing List (http://www.php.net/)
>> >>To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
>> >>For additional commands, e-mail: php-general-help
lists.php.net
>> >>To contact the list administrators, e-mail: php-list-admin
lists.php.net
>> >
>> >
>>
>>
>>--
>>PHP General Mailing List (http://www.php.net/)
>>To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
>>For additional commands, e-mail: php-general-help
lists.php.net
>>To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
attached mail follows:
Hi All, I was just wondering if any of you have heard of a web language interfacing with COBEL. There is this potential client, who has an application already written in Cobel and wants to create a web interface for the functionalities. Is it even possible? Any input would be great! Thanks! Heidi
===== Heidi Belal ICQ# 32127109
A bus stops at a bus station. A train stops at a train station. On my desk I have a work station...
__________________________________________________ Do You Yahoo!? Make a great connection at Yahoo! Personals. http://personals.yahoo.com
attached mail follows:
Already Done that one :)
"Kirk Johnson" <kjohnson
zootweb.com> wrote in message
news:01A4B59FD1EBD311838100A0C98BE0D9AD5D03
chef.zootweb.com...
> I don't know anything about IE6 in this regard, sorry. However, when we
had
> a similar problem where just 1 or 2 users out of hundreds were having
> problems, we tracked it to the fact that they had a bookmark set with an
> expired session ID as part of the bookmark url. You might want to verify
> that that isn't the problem here. Good luck!
>
> Kirk
>
> > Hi,
> >
> > I am having a few users who have 'upgraded' to IE6 saying
> > that they are
> > being booted out to the main page of my site AFTER loggin in.
> >
> > They tell me that they have set IE6 to accept all cookies,
> > but there is
> > still a problem. Of course when ever they click on one of my
> > menu options in
> > the member area it checks to see who you are by using a
> > session variable.
> >
> > I append =SID to all my strings, so actually if they move
> > their IE6 slider
> > to 'Accept No Cookies' the automatic feature of PHP kicks in
> > and appends the
> > SIDs to the URL's.
> >
> > This has really got me stumped as I seem to have no problem ( I even
> > upgraded to IE6 to check it out ). out of my 2900+members
> > only 2 are having
> > these problems.
> > php-list-admin
lists.php.net
>
attached mail follows:
Hello
Is there a way to make a page autosubmit (autoredirect to another page with POSTing data) without staing in browser history? (Something like JavaScript: window.location.replace('url') but posting values.)
The situation is: Some other webserver has a form, which posts data to my webserver. I have to put it into my database and redirect the data (not by URL) back to the webserver which sent it to me (to "Thank You" page). The problem with autosubmiting form is that my webpage stays in browser history, so going back from "Thank You" page gets to my page again and autosubmits again. The problem with window.location.replace('url') is that "Thank You" page gets data passed by URL, which I do not want.
Please help me, and Thank You.
Kamil 'Hilarion' Nowicki
attached mail follows:
Don't know about posting data, but were you able to use GET, life would be easier...
You could redirect to one page, e.g.
Header("Location: mypage.html?variable1=test&variable2=notest");
And then in mypage.html you could have a line:
Header("Location: thankyoupage.html");
mypage.html wouldn't show up in the browser history.
Thomas.
> Is there a way to make a page autosubmit (autoredirect
>to another page with POSTing data) without staing in
>browser history? (Something like JavaScript:
>window.location.replace('url') but posting values.)
>
> The situation is:
>Some other webserver has a form, which posts data to my
>webserver. I have to put it into my database and redirect
>the data (not by URL) back to the webserver which sent
>it to me (to "Thank You" page). The problem with
>autosubmiting form is that my webpage stays in browser
>history, so going back from "Thank You" page gets
>to my page again and autosubmits again. The problem with
>window.location.replace('url') is that "Thank You"
>page gets data passed by URL, which I do not want.
>
> Please help me, and Thank You.
>
> Kamil 'Hilarion' Nowicki
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
>For additional commands, e-mail: php-general-help
lists.php.net
>To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
The problem is, that 'topic.php?id=exit_id_values' still appear in URL.
> I do this quite a lot with some of my form submission (especially when using > it for forums). I'll give you that as an example: > > post.php - the posting page. User enters data > take.php - the file that processes the data > topic.php - the topic file > > take.php is where all of the action kicks in - simply, it looks like this: > > <? > if (!$some_sort_of_error) { // no errors reported > header("Location: topic.php?id=$exit_id"); > exit; > } else { > } ?>
> > Is there a way to make a page autosubmit (autoredirect > > to another page with POSTing data) without staing in > > browser history? (Something like JavaScript: > > window.location.replace('url') but posting values.)
--
Kamil 'Hilarion' Nowicki
attached mail follows:
If you want to autopost you can use this javascript:
<script> form1.submit(); </script>
"Kamil Nowicki" <hilarion
elfin.pl> wrote in message
news:003b01c1524a$2990d660$d101a8c0
elfin...
>
> Hello
>
> Is there a way to make a page autosubmit (autoredirect
> to another page with POSTing data) without staing in
> browser history? (Something like JavaScript:
> window.location.replace('url') but posting values.)
>
> The situation is:
> Some other webserver has a form, which posts data to my
> webserver. I have to put it into my database and redirect
> the data (not by URL) back to the webserver which sent
> it to me (to "Thank You" page). The problem with
> autosubmiting form is that my webpage stays in browser
> history, so going back from "Thank You" page gets
> to my page again and autosubmits again. The problem with
> window.location.replace('url') is that "Thank You"
> page gets data passed by URL, which I do not want.
>
> Please help me, and Thank You.
>
> Kamil 'Hilarion' Nowicki
>
attached mail follows:
<? $key = "secret key"; $input = $inputOrd;
if ($ACTION == "Send"){ $key = "secret key"; $input = $inputOrd; $td = mcrypt_module_open(MCRYPT_DES, "", MCRYPT_MODE_ECB, ""); $iv = mcrypt_create_iv(mcrypt_enc_get_iv_size($td), MCRYPT_RAND); mcrypt_generic_init($td, $key, $iv); $encrypted_data = mcrypt_generic($td, $input); mcrypt_generic_end($td); }
?> <FORM action="testcrypt.php" method="POST" name="testcrypt" enctype="multipart/form-data"> <TABLE> <TD> <INPUT TYPE="TEXT" name="inputOrd" VALUE="<? echo $inputOrd ?>"> </TD> <td> <? echo $encryptet_data ?> </td> </TABLE> <INPUT TYPE="SUBMIT" name="ACTION" value="Send"> </FORM>
executing this script results in a server message : Fatal error: Call to unsupported or undefined function mcrypt_module_open() in /hotel/hodclub/WWW/kalender/testcrypt/testcrypt.php on line 8
Does anybody know if this error has anything to do with the script or the server on which it runs ?!?
attached mail follows:
Thank's for all the answers... helps alot in my work to convince my System administrator...
attached mail follows:
Hi there,
This is small part of my code:
$output .= ("http://foo.bar.net/get_attachment?type=attachment&list=$listname&msg=$ msgid " . $parts['attachments_name'][$i] . "<br>");
But to my surprise the output it creates is:
http://foo.bar.net/get_attachment?type\tachment&list=mimetest&msgOfilena me.tar.gz
What could be the problem? It's not the browser as far as I know, because if I view the source of the page, it also has the weird characters. Also tried different browsers on linux & win32 platforms (you never know) and every time the same result.
Thanks,
Jeroen
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]