Reply to Re: php, GD library, Content-type

Your name:

Reply:


Posted by gosha bine on 08/07/07 13:13

On 07.08.2007 12:05 gerrymcc@indigo.ie wrote:

> Thanks very much, that works beautifully; I have only a vague idea
> why, so I hope you don't mind a question or two about it.

That's what we are here for. ;)

> 1) I presume that <img src=etc> sends a GET request to the server,
> something like thisFile.php?keyName. The server then looks at the
> file again, sees an 'img' key in $_GET and processes the script?

Correct, you got it: acquiring html file and image are two distinct and
absolutely independent requests in http.

> 2) I know key() returns the key currently pointed to in the $_GET
> array, but there's no way I can see the content of that array, is
> there? I did a var_dump($_GET) but that shows an empty array.

When you script is called with a single parameter name, without a value,
the $_GET array looks like:

array('param_name' => '') <-- empty string

> As you said, I have a LOT of reading to do :-) I spent a few
> hours last night searching; a Google on "http and web browsers"
> got many hits on specific browsers and the RFC on HTTP, but little
> of the information was useful in the context of understanding scripts
> like the above. If you could suggest any resources, that would be
> much appreciated too.

I'd start here http://en.wikipedia.org/wiki/HTTP

Also, "http sniffer" tools (that show the traffic from and to your
browser) are very useful to understand what's going on. FireBug (firefox
extension) includes such a tool.


--
gosha bine

makrell ~ http://www.tagarga.com/blok/makrell
php done right ;) http://code.google.com/p/pihipi

[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

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