Try doing something like this:

"wget --output-document=$2
http://localhost/myscript.php?url=$1&UDM_URL=$UDM_URL";

The environment variable UDM_URL is getting set in the env of wget, not of
the PHP program. You may have some issues with encoding the URL and
other stuff, but it's worth a shot. With the above statement, you should
be able to reference $UDM_URL within your PHP script.

[ Why do you want to parse your document through PHP anyway? It seems
like doing twice the amount of work. If you still want to use
PHP, it may be faster to use the PHP command line binary, instead of
putting the load on your web server. Just rebuild PHP without any server
specific (i.e. --with-apxs type) flags to get the PHP binary]

- Danish

--

On 21 Jan 2002, pere wrote:

> Author: pere
> Email: [EMAIL PROTECTED]
> Message:
> Im using mnogosearch 3.2.3 and mnogosearch-php 3.2.0 and latest PHP version.
>
> I have made a parser-script in php, and am using wget to run the script, like 
>this(in indexer.conf):
>
> "wget --output-document=$2 http://localhost/myscript.php?url=$1";
>
> I need access to complete url and filename of the file being processed. The manual 
>says this is exported to an environment variable named UDM_URL.
>
> I cant find a way to access this variable in my script. I have tried both:
> $UDM_URL and getenv(UDM_URL)
>
> Both looks empty. Accessing other environment variables like $PATH works fine.
>
> Does anyone know what is wrong?
>
> If not, is there another way to get the complete path to the file in progress. Can I 
>pass it on the commandline instead?
>
> pere
>
>
> Reply: <http://www.mnogosearch.org/board/message.php?id=3953>
>
> ___________________________________________
> If you want to unsubscribe send "unsubscribe general"
> to [EMAIL PROTECTED]
>
>

-- 
Danish Qadri
Systems Programmer
Globix Corporation
[EMAIL PROTECTED]


___________________________________________
If you want to unsubscribe send "unsubscribe general"
to [EMAIL PROTECTED]

Reply via email to