Reply to Re: [PHP] Getting parameters from a URL coming from outside the site

Your name:

Reply:


Posted by Brian V Bonini on 05/20/05 23:07

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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация