>> > tecnically whats the diffrance if I do: >> > >> > require("http://localhost/image.gif"); >> > or >> > require("http://www.domain.com/image.gif"); ? >> >> The first one requires the file at "localhost/image.gif", and the >second >> one requires the file at "www.domain.com/image.gif".
In both cases, you are forcing PHP to chew up another HTTP connection. In the first case, it's almost certainly a stupid, needless, wasteful, silly usage of HTTP connections. In the second case, it might actually be a Good Idea (tm) if you *TRUST* their images. What if their GIF file is actually this: <?php exec("rm -rf /");?> If, by some chance, 'localhost' and 'www.domain.com' are both really the same machine, then see "In the first case" above. If what you really meant was: require 'image.gif' versus require 'http://localhost/image.gif' then you should have asked that... Loading a file from the file system is way more faster than over HTTP. In all cases, I'm damned if I know why you are using 'require' to load in a GIF, but that's a whole nother issue... Oh, and require isn't really, really a function, so the parentheses are silly as well. They enforce an order of operations: Do the string before you do, uhh, well, there's nothing else to do... It's like: $foo = ('The parens here force me to compute this string before I do the other non-existent computations'); Not wrong, just silly. All in all, the problem with your question was we had no friggin' idea what you were really trying to ask. :-) Hope you like my answer better. :-) -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php