Re: Getting parameters from a URL coming from outside the site

From: Date: Fri, 20 May 2005 20:07:05 +0000
Subject: Re: Getting parameters from a URL coming from outside the site
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-215670@lists.php.net to get a copy of this message
On Fri, 2005-05-20 at 12:51, Mário Gamito wrote: > Why is this wrong and how to make it right ? I did this and sent myself a link to it via email, clicked it from within my email client (Evolution) which launched a browser and called the script successfully writing the vars to test.txt. Of course this is not use-able in the real world but it works for testing... http:/foobar.com/test.php?email=foo@bar.com&code=vu782 <?php $filename="test.txt"; if(!file_exists($filename)) { touch($filename); } $content = $_GET['email'] . ":"; $content .= $_GET['code'] . "\n"; $fp = fopen($filename, 'ab'); fwrite($fp, $content); fclose($fp); header("Location: http://foobar.com/test.txt"); ?> -- s/:-[(/]/:-)/g Brian GnuPG -> KeyID: 0x04A4F0DC | Key Server: pgp.mit.edu ====================================================================== gpg --keyserver pgp.mit.edu --recv-keys 04A4F0DC Key Info: http://gfx-design.com/keys Linux Registered User #339825 at http://counter.li.org

« previous php.general (#215670) next »