php-general Digest 10 Jul 2010 15:58:32 -0000 Issue 6839
Topics (messages 306809 through 306814):
Re: State and City Database
306809 by: Tommy Pham
306811 by: Jason Pruim
SOAPParam - Does it possible?
306810 by: Augusto Flavio
imagettftext
306812 by: Karl DeSaulniers
306813 by: Nisse Engström
There has to be a better way!!
306814 by: Jason Pruim
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 ---
> -----Original Message-----
> From: Tommy Pham [mailto:[email protected]]
> Sent: Friday, July 09, 2010 3:15 PM
> To: 'PHP'
> Subject: RE: [PHP] State and City Database
>
> > -----Original Message-----
> > From: tedd [mailto:[email protected]]
> > Sent: Friday, July 09, 2010 12:17 PM
> > To: PHP
> > Subject: Re: [PHP] State and City Database
> >
> > To all:
> >
> > http://php1.net/b/zipcode-states/index.php
> >
> > I have not tried the state/city/zip demo with any other than the
> > Safari browser. It works for that browser.
> >
> > Sorry, I should have checked it out via other browsers before
> > introducing it to the list.
> >
> > I will work on it.
> >
> > Cheers,
> >
> > tedd
> >
> > --
> > -------
> > http://sperling.com http://ancientstones.com http://earthstones.com
> >
>
>
> Tedd,
>
> Looking at your source, shouldn't be 'onChange' instead of 'onClick' for
the
> selects?
>
> Regards,
> Tommy
Sorry, force of habit camel case... :) I meant 'onchange' instead of
'onclick'.
--- End Message ---
--- Begin Message ---
On Jul 9, 2010, at 10:43 AM, tedd wrote:
At 2:07 PM +0200 7/9/10, Thijs Lensselink wrote:
On 07/07/2010 10:02 PM, tedd wrote:
Hi gang:
Does anyone have a source for a US State and City database?
Cheers,
tedd
Hey Tedd,
Maybe this helps. I used the data files for some other projects..
http://earth-info.nga.mil/gns/html/
http://geonames.usgs.gov/
LOL
Did you look at the name of the Executive Secretary on that page?
Being dyslexic, I immediately read "You Lost", which seemed ironic
for the USGS.
I know I asked in my post for US State and City database and did not
mention zip codes, but that was something I was after as well.
Strangely enough, the USGS states that it's the U.S. Census Bureau
who keeps the zip codes. But the U.S. Census Bureau says it's the US
Postal Service and the US Postal Service points to private
businesses such as:
http://www.zip-codes.com/
I was almost certain that the UP Postal Service had something, but I
couldn't find it.
I'm not sure where I got my current database, but I think I'll just
stick with it and allow the client to get a subscription for an
update (if they want).
Hey tedd,
the US Postal Service does control the Zip Codes... The reason you
couldn't get anything out of them is they do not publicly sell or give
that data out to anyone except for a few private businesses who resell
it... One of the best/cheapest sources I've found for mailing lists
(it includes the actual delivery address plus the city, state, & zip)
is melissadata.com.
Although it's not free nor exactly what you asked for they may be able
to point you in a better direction to get exactly what you want.
If you need any additional help let me know. My day job is working
directly with the post office and mailing lists :)
--- End Message ---
--- Begin Message ---
Hi,
I'm creating a wsdl server but I have one doubt about the
soapparam::soapparam().
I want to know how to return several parameters using the
soapparam::soapparam().
I'm doing this:
class MyApi implements API {
public function Send($param) {
$resp = array('resposta' => 'works', 'events' => array ('from' => 'smith',
'text' => 'Hello world', 'to' => 'john'));
return new SoapParam($resp, 'events');
}
Looking in the php.net Docs the soapparam() has this definition:
*SoapParam::SoapParam* (
mixed<http://br3.php.net/manual/en/language.pseudo-types.php#language.types.mixed>
$data , string $name )
*data*
The data to pass or return. This parameter can be passed directly as PHP
value, but in this case it will be named as *paramN* and the SOAP service
may not understand it.
*name*
The parameter name.
But How can I return the entire array: $resp = array('resposta' => 'works',
'events' => array ('from' => 'smith', 'text' => 'Hello world', 'to' =>
'john')); ?
Looks this wsdl schema in this email
I think you will understand more about my problem.
Thanks
Augusto Morais
--- End Message ---
--- Begin Message ---
Is there a way to get the width and height of text created with
imagettftext?
Karl DeSaulniers
Design Drumm
http://designdrumm.com
--- End Message ---
--- Begin Message ---
On Fri, 9 Jul 2010 20:12:38 -0500, Karl DeSaulniers wrote:
> Is there a way to get the width and height of text created with
> imagettftext?
<http://se2.php.net/manual/en/function.imagettfbbox.php>
/Nisse
--- End Message ---
--- Begin Message ---
Okay so I've been fighting with this for awhile now and haven't found
a better way yet....
What I want to do, is I have a small portion of my website included
into a template. It is displaying hosting plans so on the main site
"index.php" I want it to display a little bit of text (Same as on the
main hosting page) and just 1 random hosting plan. then if they click
on that plan and go into the main hosting section, I want them to see
ALL the hosting plans.
Here's the code that I'm using:
if($_SERVER['PHP_SELF'] = "/index.php") {
$sql = "SELECT * FROM `hosting` ORDER BY RAND() LIMIT 1";
}else{
$sql = "SELECT * FROM `hosting` ORDER BY `hostingSort` ASC";
}
Now... I know there MUST be a better way to do it but I can't see the
tree's through the forest.
Any other way I could do it?
I'm avoiding having lots of duplicate code/text on my pages.
--- End Message ---