Hi Alex,

I'm going on the assumption that since you're using a URL parameter
in the include, you have fopen_wrappers enabled, and the URL is
external to your current site. Otherwise you'd just be doing a file
system based include.

I'm not certain if PHP is clipping the parameters. Though I would
discourage this form of include for several reasons described below.
Depending on the intent of your application, you may be using the
wrong function.

What are you trying to do? Pull the code of a php script into your
script, or display the HTML output of a web page embedded in existing
content?

If you're trying to display the contents of another web page within
your own, you may want to look at readfile(), read(), fopen() or even
make a direct HTTP call to the server using sockets. Readfile() will
read and output the HTML generated by the called page. read() and
fopen() will get the output of that page and make it available to you
for your own processing. These may be more suited for such a call,
since you'll likely need to strip <HTML><HEAD...</HEAD><BODY> and
</BODY> tags out of the returned document (presuming your existing
document has already displayed these).

If you're trying to actually include the *script* code for execution
within your program, this is a really dangerous thing to do. It means
the called server gets to execute arbitrary code on your server. The
code might not be arbitrary since you control it- but if your DNS were
hacked, it means a clever hacker could actually insert a different
script.

Another point to consider- if you just want to display the HTML output
of the included page, don't use include. If the external site were
misconfigured, it may output raw php source rather than the interpreted
HTML page. If this happens, that code will be run on your server in
your current execution context. Again exposing you to arbitrary code
being run on your server.

Hope this helps,
James Harrell
http://celestia.cbstech.com


-----Original Message-----
From: Alex Hogan [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 14, 2004 1:47 PM
To: PHP General list
Subject: [PHP] Limitation to URL params on Include()?


Hi All,

Is there a limit to the number of url parameters(other than the 256
limit) that you can have on a file that you are including?
I have a file that I'm calling..,
include('http://mydomain.com/block_display.php?id=1&ttl=1011&cnt=268&lnk
=129&prv=202');
where the parameter values are record sets.

What happens is that I get the first three params and then nothing.

Any ideas?

alex hogan

****************************************************************************
*********
The contents of this e-mail and any files transmitted with it are
confidential and
intended solely for the use of the individual or entity to whom it is
addressed. The
views stated herein do not necessarily represent the view of the company. If
you are
not the intended recipient of this e-mail you may not copy, forward,
disclose, or
otherwise use it or any part of it in any form whatsoever. If you have
received this
e-mail in error please e-mail the sender.
****************************************************************************
*********

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to