php-general Digest 7 Jul 2006 08:39:57 -0000 Issue 4226
Topics (messages 239180 through 239190):
Re: uploading and extracting zip files
239180 by: Anas Mughal
Re: url obfuscation
239181 by: Anas Mughal
Re: Problem using fgetcsv()
239182 by: Al
239183 by: KermodeBear
PHP Bug Tracking
239184 by: Chris Hemmings
239185 by: Dan McCullough
239186 by: Chris Hemmings
239187 by: Dan McCullough
Re: "page expired" - problem
239188 by: Chris
Startinga shell process with a life of its own
239189 by: John Gunther
Web service in PHP
239190 by: Pham Huu Le Quoc Phuc
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 ---
I had used the uploader class (by David Fox, Dave Tufts) in a previous
project. It worked well for me. Hope you could locate it using Google.
In any case, Google could locate many upload scripts for you.
Good luck!
--
Anas Mughal
On 7/6/06, Jochem Maas <[EMAIL PROTECTED]> wrote:
Chris wrote:
> nicolas figaro wrote:
>> Chris a écrit :
>>> Schalk wrote:
>>>> Greetings All,
>>>>
>>>> Can someone please point me to a tutorial or open source 'library'
>>>> that will explain how one can upload a .zip file and then extract
>>>> it's contents and store this on the server and/or database using PHP.
>>>
>>> This will unzip a file:
>>>
>>> http://pear.php.net/package/Archive_Zip
>>>
>>> As for uploading, you'll need something else for that (I don't think
>>> there's something to do it *all* for you but I could be wrong).
>>>
>> move_uploaded_file perhaps ?
>> http://www.php.net/manual/en/function.move-uploaded-file.php
>
> That will definitely do it, I think the OP wanted something already
> built to do everything for him with no work.
just google for 'magicwand.php' ;-)
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
Anas Mughal
--- End Message ---
--- Begin Message ---
I have encrypted the values -- not the keys. With this approach, I presume I
have made it harder for anyone trying to screen scrap my data. (It is not
possible to write a script that would loop over my pages.)
Why do you need to encrypt the keys?
--
Anas Mughal
On 7/6/06, Dan McCullough <[EMAIL PROTECTED]> wrote:
Looking for a good way to obfuscation the name value pairs in a URL,
so it might be something like
http://www.domain.com/page=fjdsaflkjdsafkfjdsakfjdsalkfjsda983dsf or
something like that, I was looking at base64_encode, but was wondering
what others might do or use. It doesnt have to be super secure, but I
would still like the information to not be really visable.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
Anas Mughal
--- End Message ---
--- Begin Message ---
Don wrote:
Hi,
I have a CSV file, comma delimited with the data enclosed by double quotes.
I am using the fgetcsv() function to read and into an array and update a
database. It works great except for the odd record. After
investigating, I have ascertained that it is due to a backslash
character in the data which fgetcsv() cannot parse properly. I don;t
see anyway around this using fgetcsv(). Has anyone written a custom
routine for this?
Code Snippet
-------------------
$vvFile = 'myfile.csv';
$fph = fopen($vvFile,"r")
if ($fph) {
while (($data = fgetcsv($fph,4096,',','"')) !== FALSE) {M
// Insert fields from array '$data' to my MySQL database - will
fail on bad data
}
fclose($fph);
}
Sample Data
------------------
"123456","135679048754","7154904875","HD INDOOR INSECT KILR 33 OZ 6","EA"
"654321","246809052607","7154905260","59-2 CACTUS & SUCCULENTS \","EA"
Note: The first line is OK; the second will fail due to the backslash in
the fourth field
When I print the array contents, here is what I see. For the second
line, it is not parsing the row properly and joining the fourth and
fifth fields. When I edit and remove the backslash, all is OK.
first line:
data[0] = 123456
data[1] = 135679048754
data[2] = 7154904875
data[3] = HD INDOOR INSECT KILR 33 OZ 6
data[4] = EA
second line:
data[0] = 654321
data[1] = 246809052607
data[2] = 7154905260
data[3] = 59-2 CACTUS & SUCCULENTS ",EA
data[4] =
You can use stripslashes() on the data first.
Or, I generally use file_get_contents() and do my own parsing. That way I
control the parsing.
--- End Message ---
--- Begin Message ---
> I am using the fgetcsv() function to read and into an
> array and update a database. It works great except
> for the odd record. After investigating, I have ascertained
> that it is due to a backslash character in the data which
> fgetcsv() cannot parse properly. I don;t see anyway around
> this using fgetcsv(). Has anyone written a custom routine
> for this?
>From what I understand, there are multiple CSV formats. The first one I
stumbled across specified that the only character escaped inside of a string
is ", which is printed twice "like "" this". However, after reading some of
he user comments in the manual, it seems that MS Excel also accepts \" as an
escaped quote and the PHP code follows suit.
A quick search in bugs.php.net pulls up this:
http://bugs.php.net/bug.php?id=29278 Categorized as a "bogus" bug, with the
standard reply of read the manual and "Escaping " makes the parser skip over
that character".
So I guess they're not going to change it. Should be in the documentation,
though.
You might be better off replacing any \" sequences with \\" before reading
from the file (or, if you want to be really fancy, read the file into
memory, to the replaces, then use a fopen wrapper to treat the variable like
a file so fgetcsv will read from it properly).
Hope that helps.
-KBear
--- End Message ---
--- Begin Message ---
Can anyone point me in the direction where I can find a place to
download the bug track system that PHP/PEAR & PECL uses. I seem to
remember it is available but can't find it anymore!
Ta!
Chris.
--- End Message ---
--- Begin Message ---
This one?
http://dev.mysql.com/downloads/other/eventum/
On 7/6/06, Chris Hemmings <[EMAIL PROTECTED]> wrote:
Can anyone point me in the direction where I can find a place to
download the bug track system that PHP/PEAR & PECL uses. I seem to
remember it is available but can't find it anymore!
Ta!
Chris.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Dan McCullough wrote:
This one?
http://dev.mysql.com/downloads/other/eventum/
On 7/6/06, Chris Hemmings <[EMAIL PROTECTED]> wrote:
Can anyone point me in the direction where I can find a place to
download the bug track system that PHP/PEAR & PECL uses. I seem to
remember it is available but can't find it anymore!
Ta!
Chris.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Cheers Dan,
Looks like the one :-)
http://www.mysqltalk.org/what-software-is-used-by-bugsmysqlcom-vt10767.html
--- End Message ---
--- Begin Message ---
I just installed it so its fresh in my mind.
:)
On 7/6/06, Chris Hemmings <[EMAIL PROTECTED]> wrote:
Dan McCullough wrote:
> This one?
> http://dev.mysql.com/downloads/other/eventum/
>
> On 7/6/06, Chris Hemmings <[EMAIL PROTECTED]> wrote:
>
>> Can anyone point me in the direction where I can find a place to
>> download the bug track system that PHP/PEAR & PECL uses. I seem to
>> remember it is available but can't find it anymore!
>>
>> Ta!
>>
>> Chris.
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
Cheers Dan,
Looks like the one :-)
http://www.mysqltalk.org/what-software-is-used-by-bugsmysqlcom-vt10767.html
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
cajbecu wrote:
Hello there,
I have an website, with a lot of buttons with onClick statement.
(onclick="document.location='page.php'") The problem is that this page
is result of a search criteria (for example filtering the products with
POST method) .. Then I chose a product, click on button, and when I
click back button on the browser (Internet Explorer) it displays me:
page expired. (There are some momments when i must click twice to go
back, and i don`t know why.... in firefox work perfect.)
Did you had similar problems in past?
This has been discussed many many times in the past.
Check the archives: http://marc.theaimsgroup.com/?l=php-general
--
Postgresql & php tutorials
http://www.designmagick.com/
--- End Message ---
--- Begin Message ---
Which PHP method allows me to start a shell process from a web page
script and let it proceed to its conclusion even though I end the page.
Most of the various execute functions seem to wait for the process to
finish before PHP continues. I don't understand the ones with open/close
functions. Will opening a process and failing to close it let it run
after the page ends? Will failing to close cause other problems? Can you
point me to example code? The shell commands I want to run are typically
themselves PHP programs whose execution time is far too long to complete
in a browser context.
John Gunther
Bucks vs Bytes Inc
--- End Message ---
--- Begin Message ---
Hi!
I want to build a Web Service in PHP.
Could you give me some explain about this problem.
Have any framework of Web service in PHP?
Please help me!
--- End Message ---