php-general Digest 27 Oct 2007 16:02:08 -0000 Issue 5095
Topics (messages 263744 through 263746):
Re: returning an array from a function?
263744 by: info.phpyellow.com
Re: system command
263745 by: Instruct ICC
libgmailer.php
263746 by: arash moosavi
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
Hello List,
Your help produced a refined function. The function converts a Google Map
latitude and longitude into an equivalent Microsoft Virtual Earth latitude and
longitude.
Here is an example of how the function works, along with source code:
http://www.globalissa.com/articles/convert_google_to_mve_array_doc.php
Thank you to Ted and others who helped.
sincerely,
Rob
> At 12:09 AM -0700 10/26/07, [EMAIL PROTECTED] wrote:
> >Hello all,
> >
> >function convert( $latitude, $longitude ) {
> >
> >$mve_latitude = $latitude; // actually other processing within this
> >function determines this
> >$mve_longitude = $longitude // actually other processing within this
> >function determines this
> >$mve_both = $mve_latitude . ", " . $mve_longitude;
> >// prepare return values
> >$mve_array[0] = $mve_latitude;
> >$mve_array[1] = $mve_longitude;
> >$mve_array[2] = $mve_both;
> >
> >return $mve_array;
> >} // function
> >
> >$latitude = 23.263400;
> >$longitude = 80.110030
> >convert( $latitude, $longitude );
> >
> >print_r( $mve_array );
> >
> >.. the above does not return a value in the array. What do I have to
> >change to receive an array with global scope from this function? I
> >read several pages of docs on php.net but the light didn't go on...
> >
> >Sincerely,
> >Rob.
>
> Rob:
>
> Why use a global?
>
> Plus, your function is returning an array, but you're not catching it.
>
> $mve_array = convert( $latitude, $longitude );
>
> Example:
>
> http://www.webbytedd.com/bbb/array-function/
>
> Cheers,
>
> tedd
> --
> -------
> http://sperling.com http://ancientstones.com http://earthstones.com
>
>
--- End Message ---
--- Begin Message ---
>> Maybe something to do with the last line (but I get several lines)
>> Return Values
>>
>> Returns the last line of the command output on success, and FALSE on failure.
>>
>>
>
> I have within a web page:
> $a=system('/usr/bin/lynx -dump http://api.hostip.info/country.php?ip='.$aa);
> ?>
> .....
>
> later I pickup the variable $a again ...
>
> The problem for me is that the line $a=system('/usr/bin/lynx -dump
> http://api.hostip.info/country.php?ip='.$aa); prints (before ) the
> result ($a). I need the variable within the program, but do not want to
> display it. It seems that 'system' includes an 'echo'
I always go back to the manual:
http://php.net/system
Maybe that built-in echo is related to this:
"The system() call also tries to automatically flush the web server's output
buffer after each line of output if PHP is running as a server module."
Check out the other "Program Execution Functions" functions http://php.net/exec
particularly http://php.net/manual/en/function.exec.php
_________________________________________________________________
Peek-a-boo FREE Tricks & Treats for You!
http://www.reallivemoms.com?ocid=TXT_TAGHM&loc=us
--- End Message ---
--- Begin Message ---
I Need an example code of using Libgmailer.php for reading mails from gmail.
I can login to the gmail with this Class(libgmailer.php) but I can not find
its string output of emails text.
Thank all
--- End Message ---