php-general Digest 15 Jan 2005 18:52:16 -0000 Issue 3229
Topics (messages 206394 through 206422):
Re: php editor
206394 by: Greg Donald
206395 by: Jochem Maas
206400 by: Rick Fletcher
Re: php5 threadsafe / apache2 mpm=worker
206396 by: Jason Morehouse
206410 by: Jochem Maas
Re: sending attachment by email - can't find a bug?
206397 by: pete M
206416 by: Manuel Lemos
Re: Simple question: $_POST
206398 by: Jochem Maas
206412 by: Santa
206418 by: Jason Wong
Re: mysql improved extensions affected_rows
206399 by: Jochem Maas
Re: [PHP-WIN] including an HTML file
206401 by: Leif Gregory
Feature request for print_r() and var_dump()
206402 by: Daevid Vincent
Re: regex help
206403 by: Jason Morehouse
Using a multi-dimensional array in a POST form?
206404 by: Daevid Vincent
Strange troule with PHP and MySQL
206405 by: Phillip S. Baker
Re: Need help with array/foreach
206406 by: Jochem Maas
Experiences with PHP Training in US?
206407 by: Donald Wong
206415 by: Donald Wong
PHP - mail problems - HELP!!! PLEASE
206408 by: Kelly
Re: Help with encryption
206409 by: Michael Sims
Sessions and Objects using PHP4
206411 by: David OBrien
Re: [suspicious - maybe spam] [PHP] [suspicious - maybe spam] strange in MySQL
Query.
206413 by: Santa
Re: 404 custom handler on a cgi-wrap PHP - No input specified error
206414 by: Marek Kilimajer
Search Engine Friendly URLs
206417 by: Josh
Re: Global Postal
206419 by: Lester Caine
206422 by: Lester Caine
Best method for threading?
206420 by: Galen
Re: geographic search engine
206421 by: Lester Caine
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 ---
On Fri, 14 Jan 2005 18:47:14 +0100, Jochem Maas <[EMAIL PROTECTED]> wrote:
> in addition there is the xdebug extension by Derick Rethans its at
> version 2 but I might suggest starting with 1.3 as its alot simpler to
> use than 2 (then again if you have experience of things like
> valgrind/dbg on linux you should have little problems).
I just don't see the need. PHP explodes right on the screen for me.
I can usually find and fix an error in a few seconds of seeing it in
my browser or in my terminal. Lines numbers always accompany the
error messages, and you can even go the extra mile and link the error
messages back into the PHP manual for faster lookups when required.
Granted if you have a long running PHP app that's acting funky then
you might want to analyze it in more depth.. but at that point you
gotta ask yourself should you even be using PHP for the task at hand?
Could this task or even part of the task be better handled better with
another language?
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
--- End Message ---
--- Begin Message ---
Greg Donald wrote:
On Thu, 13 Jan 2005 22:11:05 +0000, Justin <[EMAIL PROTECTED]> wrote:
Is there a Debugger for PHP?
php -l filename.php for basic syntax check.
If you need more than that you can turn of full error reporting and
view the errors directly on the screen:
error_reporting( E_ALL );
ini_set( 'display_errors', 1 );
But later when you go to a production environment I'd go with:
error_reporting( E_ERROR | E_WARNING | E_PARSE );
ini_set( 'display_errors', 0 );
ini_set( 'log_errors', 1 );
in addition there is the xdebug extension by Derick Rethans its at
version 2 but I might suggest starting with 1.3 as its alot simpler to
use than 2 (then again if you have experience of things like
valgrind/dbg on linux you should have little problems).
obviously you need to be able to compile the extension on/for you server
(or have someone do it for you) which may not be possible for you (e.g.
because its sharedhosting)
--- End Message ---
--- Begin Message ---
I had been using Zend Studio, but I've just about made the switch to
Eclipse with the TruStudio PHP plugin.
Eclipse: http://www.eclipse.org
TruStudio: http://www.xored.com/trustudio/
Mostly running it in Linux (Fedora Core 3), but I've used that
combination in Windows and OSX, too.
--Rick
--- End Message ---
--- Begin Message ---
Yep, that's pretty much what I got, except I haven't been able to find a
list of what modules are thread safe, except mysql.
Jochem Maas wrote:
Jason Morehouse wrote:
Hello,
Just wondering if anyone is using the apache worker module with php?
I've complied php5 with zend threadsafe support, and apache2 with the
MPM worker module on a Linux box. Everything seems sweet.
mysqli_thread_safe() reports true... anyone know if this configuration
may include modules that aren't threadsafe?
if you use phpmodules that aren't threadsafe then use the prefork apache
module. or face segfault hell or at least unwanted behaviour.
anyone care to correct me? (i.e. this is what I have gathered from
reading the internals mailinglist and from various
people/friends/colleagues who are versed in these matters - I may have
got the wrong of the stick!)
I can't say which modules are threadsafe or not - I would have to look
it up - which you can probably do just as quickly yourself :-)
with-apxs2=/usr/local/apache2/bin/apxs with-gd enable-gd-native-ttf
with-pspell with-zlib with-freetype-dir with-curlwrappers
with-mime-magic with-curl enable-shmop with-jpeg-dir
with-mcrypt=/usr/lib with-mysqli enable-magic-quotes
with-enable-sockets enable-roxen-zts
Thanks,
-J
--
Vendorama
http://www.vendorama.com
The evolution of e-commerce
--- End Message ---
--- Begin Message ---
Jason Morehouse wrote:
Hello,
Just wondering if anyone is using the apache worker module with php?
I've complied php5 with zend threadsafe support, and apache2 with the
MPM worker module on a Linux box. Everything seems sweet.
mysqli_thread_safe() reports true... anyone know if this configuration
may include modules that aren't threadsafe?
if you use phpmodules that aren't threadsafe then use the prefork apache
module. or face segfault hell or at least unwanted behaviour.
anyone care to correct me? (i.e. this is what I have gathered from
reading the internals mailinglist and from various
people/friends/colleagues who are versed in these matters - I may have
got the wrong of the stick!)
I can't say which modules are threadsafe or not - I would have to look
it up - which you can probably do just as quickly yourself :-)
with-apxs2=/usr/local/apache2/bin/apxs with-gd enable-gd-native-ttf
with-pspell with-zlib with-freetype-dir with-curlwrappers
with-mime-magic with-curl enable-shmop with-jpeg-dir
with-mcrypt=/usr/lib with-mysqli enable-magic-quotes
with-enable-sockets enable-roxen-zts
Thanks,
-J
--- End Message ---
--- Begin Message ---
You need to post some code !!!!
#are you using phpMailer - makes emails a doddle
http://phpmailer.sourceforge.net/
Afan Pasalic wrote:
I have a form and once the form is submitted, php code build csv file
with entered information and store it on server in temp file. Then send
this file as an attachment to me. Code to send an attachment is included
in main code.
The code to store csv file works fine.
I'm getting the attachment in email but can't open the file: "Alert:
Unable to read the file".
Then I tried to create txt file and got the same result. Actually, I was
able to open attached file but the file was empty?!?
Then accidentally, I changed the code back to create csv file but didn't
change in code to send an attachment. after submitting the csv file was
created but got by email earlier created txt file - and it works fine. I
was able to open it?!?
My conclusion: I can't send just created file, but later, as a second
process - it works just fine. And that means, code to send an attachment
works as well.
Any ideas?
--- End Message ---
--- Begin Message ---
Hello,
on 01/14/2005 03:00 PM Afan Pasalic said the following:
I have a form and once the form is submitted, php code build csv file
with entered information and store it on server in temp file. Then send
this file as an attachment to me. Code to send an attachment is included
in main code.
The code to store csv file works fine.
I'm getting the attachment in email but can't open the file: "Alert:
Unable to read the file".
Then I tried to create txt file and got the same result. Actually, I was
able to open attached file but the file was empty?!?
Then accidentally, I changed the code back to create csv file but didn't
change in code to send an attachment. after submitting the csv file was
created but got by email earlier created txt file - and it works fine. I
was able to open it?!?
My conclusion: I can't send just created file, but later, as a second
process - it works just fine. And that means, code to send an attachment
works as well.
Any ideas?
Maybe you are using PHP safe mode which disallow file creation and you
are noty really verifying wether the file is created successfully.
--
Regards,
Manuel Lemos
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/
Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html
--- End Message ---
--- Begin Message ---
Stuart Felenstein wrote:
When using $_POST vars is it required that a form is
used ?
In other words I can create an href link and echo
variable and pick them up using $_GET in the following
page.
No so with $_POST ?
in order to create POST vars the proper request headers need to sent to
the browser. that could be done with some newfangled javascript
techniques e.g. XHTTPRequest object - see sitepoint.com (Harry Fuecks
article)
if you don't care if a var comes via post or get you could use a func
like this to avoid having to check both superglobals everytime
/**
* getGP()
*
* this function will return the value of a GET or POST var that
corresponds to the
* variable name pasted, if nothing is found NULL is returned. contents
of POST array
* takes precendence over the contents of the GET array. You can
specify a value as second argument
* which will be returned if the GP var *does not* exist; a third
parameter can be given to
* which will act as the return value if the GP *does* exist - the
limitation is that the parameter cannot be
* used to return a literal NULL; but I suggest that this would
probably be a silly thing to do in practice
*
* @var string $v // the name of GP variable whose value to return
* @var mixed $r // value to return if the GP variable was not set
* @var mixed $t // value to return if the GP variable was set (i.e.
override the value from GP)
*
* @return mixed
*/
function getGP($v = '', $r = null, $t = null)
{
if (!empty($v)) {
if (isset($_GET[$v])) { $r = (!is_null($t)) ? $t: $_GET[$v]; }
if (isset($_POST[$v])) { $r = (!is_null($t)) ? $t: $_POST[$v];}
}
return $r;
}
Stuart
--- End Message ---
--- Begin Message ---
В сообщении от Пятница 14 Январь 2005 16:48 Stuart Felenstein написал(a):
> When using $_POST vars is it required that a form is
> used ?
exactly
--- End Message ---
--- Begin Message ---
On Friday 14 January 2005 21:48, Stuart Felenstein wrote:
> When using $_POST vars is it required that a form is
> used ?
Better worded as "if you want to pass values from one page to another and you
want said values to be available in $_POST then yes, you *have* to use a
form".
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
New Year Resolution: Ignore top posted posts
--- End Message ---
--- Begin Message ---
Tom wrote:
...
It correctly updates 4 rows, but returns 1 as the count.
I think that this may actually be a mysql issue - I've put the same
php/apache configs onto another similar box, the only difference being
that the second box is mysql 5.0.1, whereas the problem is reported
against 5.0.0 (both alpha's!). The correct value is returned from the
what do you expect with alpha software (rhetorical question, not a
dig!), I'd be surprised if there are any devs out there who have spent
any serious time testing the mysqli extension again 5.0.x - regardless
of whether this is a bug in php or mysql.
brave man to go out there on the bleeding edge! you experience may prove
useful to the mysqli devs, something to bare in mind as you come accross
more problems (which you probably will!)
good luck!
second box.
Thanks
Tom
--- End Message ---
--- Begin Message ---
Hello Gaetano,
Thursday, January 13, 2005, 5:53:04 PM, you wrote:
>> So i must do all manually
>> i write this
[snip]
>> where $corpo is a variable for the name of the file.
>> if the file not existe the page have a blank body
I don't know of another way to do what you asked, which was to include
only the information contained between the <BODY> and </BODY> tags.
You could put and else clause to your if(file_exist) which would
include the contents of some other file if that condition happens.
That file could just be some default content.
Cheers,
Leif Gregory
--
TB Lists Moderator (and fellow registered end-user)
PCWize Editor / ICQ 216395 / PGP Key ID 0x7CD4926F
Web Site <http://www.PCWize.com>
--- End Message ---
--- Begin Message ---
I suggest a slight but useful change to these two functions, or possibly an
alternate parameter.
I find myself always having to do this annoyance:
echo "<B>myDevice</B><BR>";
print_r($myDevice);
To get:
myDevice
Array
(
[3333] => Array
(
[range] => range_3
[scanner] => scanner_3
[record] => record_3
)
[4444] => Array
(
[range] => range_4
[scanner] => scanner_4
[record] => record_4
)
)
It seems to me the functions should just print out the name of the array
you're looking at, at the very top, just as it prints out the keys. I
already know it's an "Array" or I wouldn't be print_r()'ing it.
--- End Message ---
--- Begin Message ---
Mike Ford wrote:
Just off the top of my head (and untested!), I'd try something like
/<b(\s+[^>]*)?>/
Cheers!
Mike
That pretty much seems to work the best. Thanks all!
--
Jason Morehouse
Vendorama - Create your own online store
http://www.vendorama.com
--- End Message ---
--- Begin Message ---
I have a lot of data I want to associate with a single line item in table of
data. The current method (which feels messy to me) is to do this....
<INPUT TYPE=HIDDEN VALUE="range_1" NAME="userange[1111]">
<INPUT TYPE=HIDDEN VALUE="scanner_1" NAME="usescanner[1111]">
<INPUT TYPE=HIDDEN VALUE="record_1" NAME="userecord[1111]">
<INPUT TYPE=HIDDEN VALUE="range_2" NAME="userange[2222]">
<INPUT TYPE=HIDDEN VALUE="scanner_2" NAME="usescanner[2222]">
<INPUT TYPE=HIDDEN VALUE="record_2" NAME="userecord[2222]">
Which gives me this:
_POST[userange] => Array
(
[1111] => range_1
[2222] => range_2
)
_POST[usescanner] => Array
(
[1111] => scanner_1
[2222] => scanner_2
)
_POST[userecord] => Array
(
[1111] => record_1
[2222] => record_2
)
What I'd like to do is this:
<INPUT TYPE=HIDDEN VALUE="range_1" NAME="device[1111][range]">
<INPUT TYPE=HIDDEN VALUE="scanner_1" NAME="device[1111][scanner]">
<INPUT TYPE=HIDDEN VALUE="record_1" NAME="device[1111][record]">
<INPUT TYPE=HIDDEN VALUE="range_2" NAME="device[2222][range]">
<INPUT TYPE=HIDDEN VALUE="scanner_2" NAME="device[2222][scanner]">
<INPUT TYPE=HIDDEN VALUE="record_2" NAME="device[2222][record]">
When I submit the form, it appears to work as illustrated by this print_r():
_POST[device] => Array
(
[1111] => Array
(
[range] => range_1
[scanner] => scanner_1
[record] => record_1
)
[2222] => Array
(
[range] => range_2
[scanner] => scanner_2
[record] => record_2
)
)
However, I don't seem to be able to access the elements?!
I've tried various combinations of tick marks on both the hidden input and
also on the retrieval to no avail...
Ie. <INPUT TYPE=HIDDEN VALUE="range_2" NAME="device[2222]['range']">
And echo "device[2222][range] = ".$device[2222]['range'];
or echo "device[2222][range] = ".$device[2222][range];
Is this possible?
--- End Message ---
--- Begin Message ---
Greetings all,
I am runnign into a strange problem.
I am working on a Linux box.
Running PHP 4.2.2
Apache 2.0
And it has MySQl installed on it (not sure of the version.
I ran a quick script to check to make sure the connection to the DB is
working fine as this is a very secure connection (have to do 2 SSH tunnesl
to get in.)
<?php
$link = mysql_connect('localhost', 'some_un', 'some_pw');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_close($link);
?>
However when I ran that I got an error saying that mysql_connect is an
undefinied function??? This has got me stumped. I checked the php.ini to
make sure that mysql is turned on (which it is by default now). Nothing I
can see is telling me other wise.
Fatal error: Call to undefined function: mysql_connect() in
/home/aiastudios/htdocs/mysql.test.php on line 13
I have noticed that on the phpinfo();
That there is no section for Mysql, which I thought was odd.
So it seems to me that mysql is disabled or something but I cannot see how
to turn it on.
Any help here would be appreciated.
--
Blessed Be
Phillip
--- End Message ---
--- Begin Message ---
Collin Davis wrote:
Hi,
Long time reader, first time poster. I've been using Dreamweaver to
generate my PHP (I know - but I'm a designer... most of this makes
absolutely zero sense to me), but I've run into something that I know could
be done better. If you look here: http://pastebin.com/228804 you can see
that I have several MySQL queries. Now I know that surely these can be
concatenated into an array or something, but I have no idea how to do that -
concatenation means sticking strings together, which is kind of what you
would do to an array if you used the join() function on it. but anyway I
grabbed this bit of code from you source file:
$db2->query("select pid,poster, ".
"date_format(posted, '%a %D %b %H:%i') as posted ".
"from pastebin where pid=".$db->f("parent_pid"));
you could do this with the sql:
$queries = array();
$queries['get_poster'] = '
select pid,poster,
date_format(posted, '%%a %%D %%b %%H:%%i') as posted
from pastebin where pid=%s';
$queries['get_poster_parents'] = '
select pid,poster,
date_format(posted, '%%a %%D %%b %%H:%%i') as posted
from pastebin where parent_pid=%s order by posted desc;"
(the double percentage signs are there for the benefit of sprintf())
the later on in the script:
$db2->query(sprintf( $queries['get_poster'],$db->f("parent_pid") ));
and
$db2->query(
sprintf( $queries['get_poster_parents'],$db->f("parent_pid")));
(sorry about the odd line wrapping)
to be honest it wasn't totally clear what you wanted to achieve (or why
- the why is often telling and will others to help with possibly
different solutions), but I hope this gives you something to go on.
I've googled until I'm blue in the face, read tutorials about arrays and
foreach loops but I just can't make sense of it. Any help anybody could
I feel like that everytime I try reading up on character
encoding/transcoding - my brain hurts and I feel the need to scream!
give me would be greatly appreciated.
Thanks,
Collin Davis
--- End Message ---
--- Begin Message ---
Hi All,
I'm looking for a PHP training course within the US, and I'm wondering
if have any recommendations.
Specifically, I want to know if there's any courses that will cover
using Kerberos through PHP, though I don't have too much hope in that.
D
--- End Message ---
--- Begin Message ---
Hi All,
I'm looking for a PHP training course within the US, and I'm wondering
if have any recommendations.
Specifically, I want to know if there's any courses that will cover
using Kerberos through PHP, though I don't have too much hope in that.
D
--- End Message ---
--- Begin Message ---
I am having trouble with PHP 5.0.3. I am running Apache 1.3.29. I am
running Solaris 9 x86 on an Intel box.
I get no errors when I start Apache. I get no errors when I run configtest.
My problem is mail() does not work. It does invoke sendmail as there is
activity in sendmail log.
When I get an error page it does not display PHP is exposed. It is
exposed in php.ini.
register_globals is turned on right now.
Variables to parse into values.
$MESG = $_POST['comments']; parses to values.
This is the log from sendmail.
The first is sending mail from WEBMIN. The second is sending from PHP
mail().
'WEBMIN'
Jan 14 20:03:13 www sendmail[17613]: [ID 801593 mail.info]
j0F23DBA017613: [EMAIL PROTECTED], size=889, class=0,
nrcpts=1, msgid=<[EMAIL PROTECTED]>, [EMAIL PROTECTED]
Jan 14 20:03:14 www sendmail[17616]: [ID 801593 mail.info]
j0F23D4b017616: from=<[EMAIL PROTECTED]>, size=1083, class=0,
nrcpts=1, msgid=<[EMAIL PROTECTED]>, proto=ESMTP, daemon=MTA-v4,
relay=localhost [127.0.0.1]
Jan 14 20:03:14 www sendmail[17613]: [ID 801593 mail.info]
j0F23DBA017613: [EMAIL PROTECTED],
[EMAIL PROTECTED] (0/1), delay=00:00:01, xdelay=00:00:01,
mailer=relay, pri=30889, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0,
stat=Sent (j0F23D4b017616 Message accepted for delivery)
Jan 14 20:03:15 www sendmail[17618]: [ID 801593 mail.info]
j0F23D4b017616: to=<[EMAIL PROTECTED]>,
ctladdr=<[EMAIL PROTECTED]> (0/1), delay=00:00:01,
xdelay=00:00:01, mailer=esmtp, pri=121083, relay=boredomsoftware.com.
[67.18.56.2], dsn=2.0.0, stat=Sent (OK id=1CpdH0-00067K-Lb)
'PHP mail()'
Jan 14 20:04:41 www sendmail[17630]: [ID 801593 mail.info]
j0F24f8b017630: from=nobody, size=200, class=0, nrcpts=0,
msgid=<[EMAIL PROTECTED]>,
[EMAIL PROTECTED]
Can someone please help me figure this out? I am desperate!! I am also
at my wits end. I have been fighting with this for a week.
Kelly
--- End Message ---
--- Begin Message ---
Greg Donald wrote:
> On Thu, 13 Jan 2005 13:53:30 -0800, Brian Dunning
> <[EMAIL PROTECTED]> wrote:
>> Could anyone point me to a web page or other documentation that
>> shows a SIMPLE example of encryption?
>
> I know absolutely nothing about encryption. There are like 6 people
> in the entire world who know something about it, but sadly.. I'm not
> one of them. Good luck in your quest.
Now, who was it that said you didn't have a sense of humor? :)
--- End Message ---
--- Begin Message ---
I have RTFM and TTFE and still am having a heck of a time getting my
objects to play well between pages
The only real examples are in the notes for classes & objects
http://us2.php.net/manual/en/language.oop.php
Basic usage
<?
include_once("config.inc");
include_once("class.php");
$songbook = new songbook(); // defined in the class.php
session_register('songbook');
$songbook->get_stats();
$songbook->populate_manu();
$songbook->populate_series();
if (!isset($songbook->userid) || $songbook->userid == "") {
header("Location: login.php");
}
Now the login.php is basically the same but if the login correctly it
should set $songbook->userid to the username
require('common.php');
session_start();
include_once("class.php");
$songbook = new songbook();
session_register('songbook');
include("newheader.php");
if ( isset($_POST['submitit'])) {
$link = dbconnector();
$sql = "select * from userinfo where
lower(username)=lower('".$_POST['user']."') and
lower(password)=lower('".$_POST['pass']."')";
$result = mysql_query($sql);
if( mysql_num_rows($result) > 0 ) {
$songbook->userid = strtolower($_POST['user']);
header("Location: green.php");
} else {
$errormsg = "<font size=3>Invalid Username or Password.<br>\nPlease Try
Again.</font>";
}
}
So I guess what I am asking is how DO you make objects work across pages?
-Dave
--- End Message ---
--- Begin Message ---
MySQL don't know what is "UNION"
--- End Message ---
--- Begin Message ---
Luke Barker wrote:
Hi,
This maybe a PHP problem, but is associated with Apache too - so my
apologies if it is slightly off topic. My web hosts use a CGI wrap
version of PHP 4.3.10
I have made a 404 custom error handler, using .htaccess in a directory
- it is usppoed to route all unfound pages to error.php, and works as
expected for .htm and .html pages as well as gifs etc. But ofr .php
scripts, e.g /path/to/wrongurl.php it doesnt show my page -
instead it shows No Input file specified.. After some Googling I have
only found people witht eh similar problem without solutions.
Can any one help me on this? I should say that in IE it just gets the
default 404 ( I think this is windows own one responding to the
particular http response header) - in firefox you get the 'No input '
error
thanks for any advice
Luke
Much like this thread:
http://marc.theaimsgroup.com/?t=110538584700004&r=1&w=2
I suppose the reason is the same, apache handles the request to php
w/out checking if the file exists. Maybe you can solve it with
auto_prepend script
--- End Message ---
--- Begin Message ---
I am converting a site to use includes instead of a Dreamweaver template. I
want the URLs to look like this: www.my-site1234.com/contact instead of
www.my-site1234.com/default.php?p=contact.
I found some tutorials on editing the .htaccess file but where do I find it
on the server?
--- End Message ---
--- Begin Message ---
I'd posted this link yesterday on the geographic search engine thread,
but it has not appeared.
Richard Lynch wrote:
Is anybody aware of any existing world-wide data-collection effort of
postal codes in relation to geogrpahical coordinates (long/lat)?
Just:
country_code + postal_code <====> (long, lat)
in a one-to-one relationship, as crude as that might be.
http://ibWebAdmin.lsces.co.uk/FirebirdFederationDataArchive.html
I've added the GB_POSTAREA table with some 3000 primary postal area
entries, all with XY coordinates which can be used on www.multimap.com
(See the notes in the DATA_INDEX for details on how to use - getting to
them will give you exercise on ibWebAdmin ;) )
Also added last night is an old US_ZIPCODE table - it's a start.
The object of the archive is to build a database of useful information
such as post codes, states, towns/cities, and the like - all running on
PHP of cause, into a Firebird database.
Feel free to forward any additional information you have for inclusion ;)
--
Lester Caine
-----------------------------
L.S.Caine Electronic Services
--- End Message ---
--- Begin Message ---
Richard Lynch wrote:
Is anybody aware of any existing world-wide data-collection effort of
postal codes in relation to geogrpahical coordinates (long/lat)?
Just:
country_code + postal_code <====> (long, lat)
in a one-to-one relationship, as crude as that might be.
I've tried to post this twice now, third time lucky ;)
http://ibWebAdmin.lsces.co.uk/FirebirdFederationDataArchive.html
I've added the GB_POSTAREA table with some 3000 primary postal area
entries, all with XY coordinates which can be used on www.multimap.com
This is a PHP based management interface to Firebird, so we can add
information directly into the database, but I plan to allow a more
controlled entry at some point in the future.
--
Lester Caine
-----------------------------
L.S.Caine Electronic Services
--- End Message ---
--- Begin Message ---
I'm working on a web spider application where the server has
considerable latency in serving the information I require, but
simultaneous requests do not have a significant performance hit. I have
a nice little class that handles all the sessions, cookies, etc
perfectly. What's the best way to basically hand off a bunch of threads
to access this information without hanging up the execution of my
script? I plan to handle inter-thread coordination via MySQL and code
in the main script. I've done threads before like this and have had
great luck, but all my solutions have been hack-ish at best. What are
the cleanest solution for this? What do you all do to handle situations
like this?
I will be running PHP 4.3.1.0 under Linux and Mac OS X, depending on
location.
Thoughts anybody?
--- End Message ---
--- Begin Message ---
For those who were asking about UK post code mapping
http://ibWebAdmin.lsces.co.uk/FirebirdFederationDataArchive.html
I've added the GB_POSTAREA table with some 3000 primary postal area
entries, all with XY coordinates which can be used on www.multimap.com
As yet these are a local metric grid rather than Latitude and Longitude
but they work well for distance comparison in the UK, and multimap use
the same thing on all their world maps.
You can download a CSV dump using the instructions provided, all PHP
into Firebird ;)
There is also a Firebird backup if people want it - eMail requests at
the moment so I can keep load down :)
I am waiting for some of the tables including the US zip table. I have a
UK full postcode table in multimap format, but it's 200Mb! So 'not just
yet'.
--
Lester Caine
-----------------------------
L.S.Caine Electronic Services
--- End Message ---