php-general Digest 30 Jun 2006 02:36:15 -0000 Issue 4213
Topics (messages 238919 through 238949):
Re: Programming question - New to PHP
238919 by: Russbucket
Re: modify xml before parse
238920 by: Adam Zey
Re: creating a threaded message system--sorting messages
238921 by: Adam Zey
238923 by: Ben Liu
238924 by: KermodeBear
238931 by: Ben Liu
238933 by: Adam Zey
238937 by: KermodeBear
238943 by: Dan McCullough
Re: running system()
238922 by: Mark Steudel
Re: working on a template system...
238925 by: Charlene Wroblewski
design?
238926 by: Sjef
238949 by: David Tulloh
Re: Update site through email
238927 by: Manuel Lemos
238930 by: Adam Zey
Re: image upload problem
238928 by: Jochem Maas
Re: Documentation software
238929 by: Jochem Maas
Find out cookies on a computer?
238932 by: Peter Lauri
238934 by: Peter Lauri
238935 by: Adam Zey
238936 by: Michael Rasmussen
238938 by: Peter Lauri
238939 by: Jay Blanchard
238940 by: Michael Rasmussen
238941 by: Dave Goodchild
238942 by: Richard Collyer
238944 by: Peter Lauri
Re: running number in paging
238945 by: Chris
Re: [NEWBIE] PHP General List Guide & Other Good Stuff
238946 by: Chris
238947 by: Scott Heinrichs
xpath question
238948 by: bruce
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 Thursday 29 June 2006 06:29, Jeremy Schreckhise wrote:
<snip>
> Try
> $link = mysql_connect('localhost',$youruser,$yourpassword) or die();
> mysql_select_db('yourdb');
>
> $query = 'SELECT * FROM Moses_Lake_Lions';
> if(!$result = mysql_query ($query,$link))
> {
> // do error checking here
> }
>
> Jeremy Schreckhise, M.B.A.
>
> -----Original Message-----
> From: Russbucket [mailto:[EMAIL PROTECTED]
Thanks I'll try that.
--
Russ
--- End Message ---
--- Begin Message ---
Yeo Wee Tat wrote:
Hi Adam,
I can modify the xml file without any error , however when I tried to
unserializer the xml file using PEAR:XML , it gave the error message below.
I have attached my code for your perusal.
Any ideas ? thanks
<?php
ini_set('display_errors', E_ALL);
require_once '../library/config.php';
require_once '../library/class.XMLUtil.php';
$xmlfile = "/home/gvintranet/datacraft/htdocs/uploads/cisco.xml";
$xml = preg_replace("/<!\\[CDATA\\[.+?\\]\\]>/", "<![CDATA[ignore_this]]>",
$xml);
$filehandle = fopen($xmlfile, 'wb');
$ok = fwrite($filehandle,$xml);
echo "ok".$ok;
$options = array("complexType" => "object");
$xml_util = new XMLUtil($xmlfile, $options);
$xml_util->unserializer_XML(true);
$data = $xml_util->getUnserializedData();
echo print_r($data);
?>
error message:
pear_error Object ( [error_message_prefix] => [mode] => 1 [level] => 1024
[code] => 151 [message] => No unserialized data available. Use
XML_Unserializer::unserialize() first. [userinfo] => [backtrace] => Array (
[0] => Array ( [file] => /usr/share/pear/PEAR.php [line] => 566 [function]
=> pear_error [class] => pear_error [type] => -> [args] => Array ( [0] => No
unserialized data available. Use XML_Unserializer::unserialize() first. [1]
=> 151 [2] => 1 [3] => 1024 [4] => ) ) [1] => Array ( [file] =>
/usr/share/pear/XML/Unserializer.php [line] => 489 [function] => raiseerror
[class] => xml_unserializer [type] => -> [args] => Array ( [0] => No
unserialized data available. Use XML_Unserializer::unserialize() first. [1]
=> 151 ) ) [2] => Array ( [file] =>
/home/gvintranet/datacraft/htdocs/library/class.XMLUtil.php [line] => 54
[function] => getunserializeddata [class] => xml_unserializer [type] => ->
[args] => Array ( ) ) [3] => Array ( [file] =>
/home/gvintranet/datacraft/htdocs/admin/test_regex.php [line] => 43
[function] => getunserializeddata [class] => xmlutil [type] => -> [args] =>
Array ( ) ) ) [callback] => ) 1
Yeo Wee Tat
Tel: +65-62730049 Fax: +65-62734934
Cxrus Solutions Pte Ltd (Singapore . Thailand)
1003 Bukit Merah Central #05-20 Singapore 159836
System Integration . Business Solutions . Linux Simplified
I must admit, I've never used Pear for anything (I stick to SimpleXML
myself). Perhaps it doesn't like the new cdata tag you're writing? Have
you tried replacing the entire cdata tag with an empty string, or trying
another XML parser (like SimpleXML) just to see if the trouble is with
your XML or Pear?
Regards, Adam.
--- End Message ---
--- Begin Message ---
Ben Liu wrote:
This question might deviate from PHP into the domain of MySQL but I
thought best to post here first. I'm building a message board system
with PHP/MySQL. I'm trying to present the messages to the users in
threaded order rather than flat. I'm having a lot of trouble figuring
out how to sort the posts so they appear in the correct threaded
order. I don't think I can do this purely with a SQL query. If it can
be done this way, please suggest how and I'll take this question to
the MySQL list.
I think I have figured out the basic logic, I just have no idea how to
translate it into code. Also, I may have the logic wrong. Anyhow this
is what I have so far:
relevant data structure loosely:
post_id (unique, autoincrement, primary index)
parent_id (if the post is a child, this field contains the post_id of
its parent)
...
1) Query the database for all messages under a certain topic, sort by
parent_id then post_id
2) Somehow resort the data so that each group of children is directly
after their parent. Do this in order of ascending parent_id.
Can this be done with usort() and some programatic logic/algorithm?
How do you sort groups of items together rather than comparing each
array element to the next array element (ie: sorting one item at a
time)? Should this be done with a recursive algorithm?
Anyone with experience writing code for this type of message board, or
implementing existing code? Thanks for any help in advance.
- Ben
Just throwing an idea out there, but you can do the sorting entirely in
the SQL query. The trick is to figure out the best way.
The first idea that came to mind (and it sucks, but it works), is a text
field with padded numbers separated by dots, and the number is the
position in relation to the parent. So, with this:
Post 1
Post 3
Post 5
Post 6
Post 4
Post 7
Post 2
Post 8
Now, to the helper field would contain this for each post:
Post 1: 1
Post 2: 2
Post 3: 1.1
Post 4: 1.2
Post 5: 1.1.1
Post 6: 1.1.2
Post 7: 1.2.1
Post 8: 2.1
Now, by pure ascii sorting in that field, that would sort out to:
Post 1: 1
Post 3: 1.1
Post 5: 1.1.1
Post 6: 1.1.2
Post 4: 1.2
Post 7: 1.2.1
Post 2: 2
Post 8: 2.1
Which is the correct sort order. The depth of the post (how far to
indent it?) could be told in PHP by counting the number of periods, or
storing it in the database.
Now, how to figure out what to put in that field for each post? We need
to do two things. First, each post needs to store the number of
children. Next, when a new post is made, we do three things (Keeping in
mind that in real life I'd pad each "entry" in the sort helper field
with zeros on the left up to some large number):
1) Get the sort helper field of the parent and the parent's child count
field
2) Take the parent's sort help field, and add on a period and the
parent's child count plus one, insert the child.
3) Update the parent's child count.
OK, now, this method sucks. It's slow, and limits the number of child
posts to whatever you pad (In itself, not a big issue, if each post can
only have, say, a thousand direct childs (which each themselves can have
a thousand childs), not a huge issue). The slow part from ascii sorting
everything is the problem, I'd think.
I've never done threaded anything before, so I assume there's a better
solution. I'm just saying that the job CAN be done entirely with SQL
sorting. And probably faster than your proposed method of resorting
everything once PHP gets ahold of it. It should be noted that you'd need
each post to have a sort of superparent field that stored the topmost
parent so that you could do something simple like selecting ten
superparents and all their children.
Regards, Adam.
--- End Message ---
--- Begin Message ---
On 6/29/06, Adam Zey <[EMAIL PROTECTED]> wrote:
Just throwing an idea out there, but you can do the sorting entirely in
the SQL query. The trick is to figure out the best way.
The first idea that came to mind (and it sucks, but it works), is a text
field with padded numbers separated by dots, and the number is the
position in relation to the parent. So, with this:
Post 1
Post 3
Post 5
Post 6
Post 4
Post 7
Post 2
Post 8
Now, to the helper field would contain this for each post:
Post 1: 1
Post 2: 2
Post 3: 1.1
Post 4: 1.2
Post 5: 1.1.1
Post 6: 1.1.2
Post 7: 1.2.1
Post 8: 2.1
Now, by pure ascii sorting in that field, that would sort out to:
Post 1: 1
Post 3: 1.1
Post 5: 1.1.1
Post 6: 1.1.2
Post 4: 1.2
Post 7: 1.2.1
Post 2: 2
Post 8: 2.1
Which is the correct sort order. The depth of the post (how far to
indent it?) could be told in PHP by counting the number of periods, or
storing it in the database.
The indentation part I've already sort of figured out--it uses some
php to create a divs-within-divs structure, then using some simple CSS
I can get the appropriate level of indentation.
Now, how to figure out what to put in that field for each post? We need
to do two things. First, each post needs to store the number of
children. Next, when a new post is made, we do three things (Keeping in
mind that in real life I'd pad each "entry" in the sort helper field
with zeros on the left up to some large number):
1) Get the sort helper field of the parent and the parent's child count
field
2) Take the parent's sort help field, and add on a period and the
parent's child count plus one, insert the child.
3) Update the parent's child count.
OK, now, this method sucks. It's slow, and limits the number of child
posts to whatever you pad (In itself, not a big issue, if each post can
only have, say, a thousand direct childs (which each themselves can have
a thousand childs), not a huge issue). The slow part from ascii sorting
everything is the problem, I'd think.
I've never done threaded anything before, so I assume there's a better
solution. I'm just saying that the job CAN be done entirely with SQL
sorting. And probably faster than your proposed method of resorting
everything once PHP gets ahold of it. It should be noted that you'd need
each post to have a sort of superparent field that stored the topmost
parent so that you could do something simple like selecting ten
superparents and all their children.
Regards, Adam.
Thanks for the help Adam, I'll try to wrap my head around your response...
- Ben
--- End Message ---
--- Begin Message ---
Sounds like that darn Hierarchial Data again. Give this a read and see if it
helps you out at all. In particular, you may find the area 'Finding the
Depth of the Nodes' helpful.
http://dev.mysql.com/tech-resources/articles/hierarchical-data.html
Hope it helps,
-K.Bear
--- End Message ---
--- Begin Message ---
<SOLVED>, almost. I read the article suggested by K.Bear and found the
recommended solution to be a bit more complicated than I wanted to
implement. I then found another way to do this using the existing
"Adjacency List Model" through a recursive function. So basically, you
query the database for the post_id of the very first post in the
discussion. You then call a function that displays that post, searches
for all children of that post and then calls itself recursively on
each of the children it discovers. This works great for spitting out
the posts in the proper order. Now I'm trying to figure out how to
make sure the indenting looks right in the browser.
- Ben
--- End Message ---
--- Begin Message ---
Ben Liu wrote:
<SOLVED>, almost. I read the article suggested by K.Bear and found the
recommended solution to be a bit more complicated than I wanted to
implement. I then found another way to do this using the existing
"Adjacency List Model" through a recursive function. So basically, you
query the database for the post_id of the very first post in the
discussion. You then call a function that displays that post, searches
for all children of that post and then calls itself recursively on
each of the children it discovers. This works great for spitting out
the posts in the proper order. Now I'm trying to figure out how to
make sure the indenting looks right in the browser.
- Ben
Wouldn't that involve a separate SQL query for every post? Avoid that at
all costs. That's insanely slow and wasteful. Recursive functions have
no business using SQL queries. I'd suggest you start looking for a more
sane method of doing this.
Regards, Adam.
--- End Message ---
--- Begin Message ---
Hello,
As Adam pointed out, this can be deadly to your database, especially as the
number of posts grows. If you want to go that route, I would recommend
selecting all the posts in that particular thread and sorting the data out
in PHP somehow. No need to slam your database with (potentially) hundreds of
queries to display a discussion. Multiply that by several page views at
once...
If you don't mind the extra work and investigation, I would recommend
downloading some PHP forum software that supports threaded discussion and
see how they implement it. I found several listed in DMOZ:
http://dmoz.org/Computers/Programming/Languages/PHP/Scripts/Forums/
Let us know what you come up with! I'd like to see how you work this out.
This is a good computer science type of problem with practical application -
the kind of stuff they should have taught me in school but never did. ~(o:
Best of luck,
-K.Bear
> <SOLVED>, almost. I read the article suggested by K.Bear and found the
> recommended solution to be a bit more complicated than I wanted to
> implement. I then found another way to do this using the existing
> "Adjacency List Model" through a recursive function. So basically, you
> query the database for the post_id of the very first post in the
> discussion. You then call a function that displays that post, searches
> for all children of that post and then calls itself recursively on
> each of the children it discovers. This works great for spitting out
> the posts in the proper order. Now I'm trying to figure out how to
> make sure the indenting looks right in the browser.
>
> - Ben
>
>> Wouldn't that involve a separate SQL query for every post?
--- End Message ---
--- Begin Message ---
I've come into this discussion pretty late so please bear with me if I
go over something that has been ruled out.
You are trying to print out in a threaded method the first post in a
thread followed by each post after that, that is a child/reply to that
post. Is that correct?
So something like
Example 1
Thread1
Post1
Post2
Post3
Post4
.....
or
Example 2
Thread1
Post1
Post2 - reply to post 1
Post3 - reply to post 2
Post4 - reply to post 1
Post5 - reply to post 1
Post6 - reply to post 2
Post7 - reply to post 3
Example 1 is very common and is the easiest to implement. From what I
remember you would need a couple of DB tables for post, post_thread,
post_post, thread
So for your question thread isnt very relative but I thought I would
throw it in.
thread {
threadid int(11) auto_increment,
threadname
threadsort
...
thread_post {
threadid int(11)
postid int(11)
....
post {
postid int(11) auto_increment,
postname
posttext
...
post_post
postid int(11),
postid2 int(11)
....
Please note I have two kids fighting over the cat, trying to cook
dinner and stave off a flood of water from the rising river so the SQL
structure is for example.
You can get everything in one query from the DB and lay it out based
on the id of the post, if you DB is properly indexed and setup and
queries are optimized you'll hardly notice a blip when the load gets
up. You do not want to be doing multiple queries on a page when one
well written query will do the trick.
Either way if this is more what you are looking for we can get into
specifics later.
Dan
On 6/29/06, KermodeBear <[EMAIL PROTECTED]> wrote:
Hello,
As Adam pointed out, this can be deadly to your database, especially as the
number of posts grows. If you want to go that route, I would recommend
selecting all the posts in that particular thread and sorting the data out
in PHP somehow. No need to slam your database with (potentially) hundreds of
queries to display a discussion. Multiply that by several page views at
once...
If you don't mind the extra work and investigation, I would recommend
downloading some PHP forum software that supports threaded discussion and
see how they implement it. I found several listed in DMOZ:
http://dmoz.org/Computers/Programming/Languages/PHP/Scripts/Forums/
Let us know what you come up with! I'd like to see how you work this out.
This is a good computer science type of problem with practical application -
the kind of stuff they should have taught me in school but never did. ~(o:
Best of luck,
-K.Bear
> <SOLVED>, almost. I read the article suggested by K.Bear and found the
> recommended solution to be a bit more complicated than I wanted to
> implement. I then found another way to do this using the existing
> "Adjacency List Model" through a recursive function. So basically, you
> query the database for the post_id of the very first post in the
> discussion. You then call a function that displays that post, searches
> for all children of that post and then calls itself recursively on
> each of the children it discovers. This works great for spitting out
> the posts in the proper order. Now I'm trying to figure out how to
> make sure the indenting looks right in the browser.
>
> - Ben
>
>> Wouldn't that involve a separate SQL query for every post?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
I'm trying to use gpgp to encrypt and decrypt files. I can get it to work if
it's a scheduled task, as the user that's running the task isn't the web
user, but I was just wondering if there was a way to safely enable system
for a shared environment.
-----Original Message-----
From: Chris [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 28, 2006 8:01 PM
To: Mark Steudel
Cc: [email protected]
Subject: Re: [PHP] running system()
Mark Steudel wrote:
> So I'm trying to run some system commands on the windows box I am working
> on. And I am getting "Unable to fork" errors. So after some googling I see
> that its because the internet guest user needs access to cmd.exe, my
> question is how safe is it to enable this on a production/shared
> environment? Anyways pointers to securely setting this up?
If it's enabled, it's enabled for everyone.
If you're calling system, make sure you use escapeshellarg and
escapeshellcmd in the relevant places.
That's not going to protect you from other peoples bad code though..
What are you trying to use system() for? Maybe there's a built in
function or another way to do what you need.
--
Postgresql & php tutorials
http://www.designmagick.com/
--- End Message ---
--- Begin Message ---
*joining the fray a little late*
What is the difference between this, Smarty and template.inc?
I have found Smarty to be unusable in my situation where a graphic
designer needs to be able to edit the html and is easily confused by
non-html.
So, I am using template.inc which is apparently old (PHP 3) but seems to
work great even with PHP 4.1. Another question is whether it will work
with PHP 5?
Charlene
sempsteen wrote:
hi, i'm working on a template system. Basically i'm building raw
contents in arrays and then put them in templates by some special
tags.
for loop systems my basic array structure is like this:
$array['key'][]['keyword'] = ...
for example, for a bulletin board system, array structure for
categories is something like this:
$array['categories'][]['text_category_name'] = ...
it is looped through database recordset, so final array for 2
categories can be:
$array['categories'][0]['text_category_name'] = 'programming'
$array['categories'][1]['text_category_name'] = 'life'
template file structure for loops is something like this (ex,
categories):
<!-- loop|categories:bof -->
<tr>
<td>[$text_category_name$]</td>
</tr>
<!-- loop|categories:eof -->
i can easily loop this template and replace [$text_category_name] for
every category set in the array. after removing the comment tags i get
the final content:
<tr>
<td>programming</td>
</tr>
<tr>
<td>life</td>
</tr>
But i'm stuck with nested loops. For example i want to put related
forums after each categories.
array structure is:
$array['categories'][0]['text_category_name'] = programming
$array['categories'][0]['forums'][0]['text_forum_name'] = php
$array['categories'][0]['forums'][1]['text_forum_name'] = ruby
$array['categories'][1]['text_category_name'] = life
$array['categories'][1]['forums'][0]['text_forum_name'] = music
$array['categories'][1]['forums'][1]['text_forum_name'] = sports
template structure is:
<!-- loop|categories:bof -->
<tr>
<td>[$text_category_name$]</td>
</tr>
<!-- loop|forums:bof -->
<tr>
<td>[$text_forum_name$]</td>
</tr>
<!-- loop|forums:eof -->
<!-- loop|categories:eof -->
i've written some functions, used them recursively but it didn't work.
actually i couldn't find the true logic. note that it isn't a limited
array. it can have messages under each forums, peoples under each
messages, so on..
help me find the true approach to handle this. thank you.
--- End Message ---
--- Begin Message ---
Hi there,
I am starting a new, very small project. A simple question and answering
form. In one screen, question and answer can be typed, the strings will be
saved in a database table questions which holds question and answer (as
there is only one answer to a question). There will be a webpage displaying
all the questions, clickable to the webpage of the answer to the question
clicked.
I want to create a class Question for dealing wiht the questions and a class
answer for the answers. Each could contain an array with the their part of
the content of the database table. The class Question manages the class
Answer, so when instantiating the Question, the Answer will follow.
Beside of this I want to create a 'visual' component class that creates the
lists as displayed on the webpage.
Is this a good idea? Or should I not bother, and just create one class
Question that also deals with the Answers.
Thanxs!
Sjef
--- End Message ---
--- Begin Message ---
Sjef wrote:
> Hi there,
>
> I am starting a new, very small project. A simple question and answering
> form. In one screen, question and answer can be typed, the strings will be
> saved in a database table questions which holds question and answer (as
> there is only one answer to a question). There will be a webpage displaying
> all the questions, clickable to the webpage of the answer to the question
> clicked.
>
> I want to create a class Question for dealing wiht the questions and a class
> answer for the answers. Each could contain an array with the their part of
> the content of the database table. The class Question manages the class
> Answer, so when instantiating the Question, the Answer will follow.
> Beside of this I want to create a 'visual' component class that creates the
> lists as displayed on the webpage.
>
> Is this a good idea? Or should I not bother, and just create one class
> Question that also deals with the Answers.
>
You have essentially three pages:
one that displays a form and inputs the entered data to a database;
one that gets a list of questions from the database;
one that displays a specific question/answer pair.
As a ballpark estimate, I'd say that the above should be possible in
under 100 lines of PHP code.
You are looking at creating a Question class, an Answer class and a
Visual/List class. The net result being that you double the number of
PHP files and considerably increase the amount of code, there isn't much
opportunity for code reuse here.
Now, if the objective is to play with php OOP then go ahead. I would
even suggest a DB class, a TableRow class, the Question and Answer then
inherit from the TableRow, a TableRows class from which your List class
would inherit. Maybe throw a few in to control the templates etc. as well.
If the objective is just to get the job done and the site out, I don't
see why you should bother with OOP at all.
David
--- End Message ---
--- Begin Message ---
Hello,
on 06/29/2006 10:54 AM Rodrigo de Oliveira Costa said the following:
> Hy guys I'd like to know if there is a way to update a site through
> sending an email. Something like this, you send an email and the body
> of the email substitutes a text you use in your site. Igreat apreciate
> any help since I couldn't find anything on this topic.
Sure, you can send a message attaching the files you want to update in
your site to an address with a POP3 mailbox and then use a POP3 client
to retrieve and parse the message to extract the files to be updated.
You may want to try this POP3 client class that you can use for that
purpose.
It provides a cool feature that lets you retrieve messages from POP3
mailbox using PHP fopen or file_get_contents functions like this:
file_get_contents('pop3://user:[EMAIL PROTECTED]/1');
http://www.phpclasses.org/pop3class
You can also use this message parser class that lets you process your
messages and extract any files easily.
http://www.phpclasses.org/mimeparser
Take a look at this example that demonstrates how to integrate both
classes easily to parse your message structure:
http://www.phpclasses.org/browse/file/14695.html
--
Regards,
Manuel Lemos
Metastorage - Data object relational mapping layer generator
http://www.metastorage.net/
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
--- End Message ---
--- Begin Message ---
Manuel Lemos wrote:
Hello,
on 06/29/2006 10:54 AM Rodrigo de Oliveira Costa said the following:
Hy guys I'd like to know if there is a way to update a site through
sending an email. Something like this, you send an email and the body
of the email substitutes a text you use in your site. Igreat apreciate
any help since I couldn't find anything on this topic.
Sure, you can send a message attaching the files you want to update in
your site to an address with a POP3 mailbox and then use a POP3 client
to retrieve and parse the message to extract the files to be updated.
You may want to try this POP3 client class that you can use for that
purpose.
It provides a cool feature that lets you retrieve messages from POP3
mailbox using PHP fopen or file_get_contents functions like this:
file_get_contents('pop3://user:[EMAIL PROTECTED]/1');
http://www.phpclasses.org/pop3class
You can also use this message parser class that lets you process your
messages and extract any files easily.
http://www.phpclasses.org/mimeparser
Take a look at this example that demonstrates how to integrate both
classes easily to parse your message structure:
http://www.phpclasses.org/browse/file/14695.html
I've had to have a perl script reacting to emails and acting on them. I
did it using RetchMail (http://open.nit.ca/wiki/?page=RetchMail), which
is mindnumbingly fast when you need to download a bunch of emails. As
the page says, stupidly fast. As a disclaimer, it's an opensource app
maintained by people at my workplace. Still, it's probably the fastest
POP3 mail fetcher out there.
Regards, Adam Zey.
--- End Message ---
--- Begin Message ---
suresh kumar wrote:
> Hi,
hi ([EMAIL PROTECTED]([EMAIL PROTECTED]([EMAIL PROTECTED](*%([EMAIL
PROTECTED]([EMAIL PROTECTED]@#
> I am waiting reply from any one
do we have someone here called 'any one'? how about you reply to one
of the people who answer your questions.
PS - the tmp file is removed at the end of the request.
PPS - <?php echo "it is temporarily stored at {$_FILES['ufile']['tmp_name']}";
?>
>
>
> ---------------------------------
> Yahoo! India Answers: Share what you know. Learn something new Click here
> Catch all the FIFA World Cup 2006 action on Yahoo! India Click here
--- End Message ---
--- Begin Message ---
Mathieu Dumoulin wrote:
> This is not a php specific question but more a programming question. I'd
oh we'll answer Q's on anything from ASP to STDs on this list ;-)
> like to know names of software that help in creating documentation like
> the microsoft style of documentation when you visit the MSDN library. I
MSDN is documentation hell in terms of navigation AND content (jmho).
you could try this: http://www.phpdoc.org/
note that phpDocumentor is aimed primarily at API documentation
alternatively maybe this gives you a few options:
http://www.google.com/search?q=php+documentation+tool
> can also see that often one some sites like the VBCORLIB web site.
>
> I'm sure there is something out there, i'd like mostly a web based one
> and open source or free obviously...
>
> Waiting for your input, thanks
>
--- End Message ---
--- Begin Message ---
Is it possible to some how find out all cookies on a specific computer and
their name and value? I assume not :)
/Peter
--- End Message ---
--- Begin Message ---
Is the question dumb? Why you answer it then? It is very interesting in a
security manner. I have very low knowledge about them, so therefore the
question. And if you think this question is unethical, and the rest of the
society does that, we would probably not have as secure technology regarding
cookies _as you state it is_. Rethink you answer a bit...
As a developer I would like to know if someone can view the cookies that are
not authorized to do so. Sorry for wanting to learn more...
-----Original Message-----
From: Adam Zey [mailto:[EMAIL PROTECTED]
Sent: Friday, June 30, 2006 4:32 AM
To: Peter Lauri
Cc: [email protected]
Subject: Re: Find out cookies on a computer?
Peter Lauri wrote:
> Is it possible to some how find out all cookies on a specific computer and
> their name and value? I assume not :)
>
>
>
> /Peter
>
No, because you don't OWN them, therefore you have no right (either
technologically or ethically) to see them. Asking such unethical
questions on this list is, well, pretty dumb.
Regards, Adam.
--- End Message ---
--- Begin Message ---
Peter Lauri wrote:
Is it possible to some how find out all cookies on a specific computer and
their name and value? I assume not :)
/Peter
No, because you don't OWN them, therefore you have no right (either
technologically or ethically) to see them. Asking such unethical
questions on this list is, well, pretty dumb.
Regards, Adam.
--- End Message ---
--- Begin Message ---
On Fri, 30 Jun 2006 04:23:51 +0700, Peter Lauri wrote:
> Is it possible to some how find out all cookies on a specific computer
> and their name and value? I assume not :)
The global array $_COOKIE should hold any cookie which is available to you
--
Hilsen/Regards
Michael Rasmussen
http://keyserver.veridis.com:11371/pks/lookup?op=get&search=0xE3E80917
--- End Message ---
--- Begin Message ---
<snip>
The global array $_COOKIE should hold any cookie which is available to you
</snip>
Yes, but that is just for the ones available for me. Like Google, they set a
cookie if you click on one of their "adwords" ads and then use them in the
tracking of the customer conversion.
Cookies like this are interesting to use. One of my clients want to track a
little deeper the "adwords" and the conversion of them, and to get that
cookie would be awesome.
But I am loosing hope that it can be done now :)
--- End Message ---
--- Begin Message ---
[snip]
But I am loosing hope that it can be done now :)
[/snip]
I will go ahead and remove all hope. If you do not own the cookie, you
cannot see it or use it. It is a rule of this jungle that has been in
place for years.
--- End Message ---
--- Begin Message ---
On Fri, 30 Jun 2006 05:06:33 +0700, Peter Lauri wrote:
>
> Yes, but that is just for the ones available for me. Like Google, they set
> a cookie if you click on one of their "adwords" ads and then use them in
> the tracking of the customer conversion.
The place where the cookies are stored is dependant of the users browser
and platform. Try this by having MS IE and FF display all stored cookies -
I bet you would get a different picture.
--
Hilsen/Regards
Michael Rasmussen
http://keyserver.veridis.com:11371/pks/lookup?op=get&search=0xE3E80917
--- End Message ---
--- Begin Message ---
On 29/06/06, Jay Blanchard <[EMAIL PROTECTED]> wrote:
[snip]
But I am loosing hope that it can be done now :)
[/snip]
I will go ahead and remove all hope. If you do not own the cookie, you
cannot see it or use it. It is a rule of this jungle that has been in
place for years.
Yes, let's put this baby to bed. You have access to the $_COOKIE
superglobal array and that is it. Period, Full stop. End.
--
http://www.web-buddha.co.uk
http://www.projectkarma.co.uk
--- End Message ---
--- Begin Message ---
Peter Lauri wrote:
Is the question dumb? Why you answer it then? It is very interesting in a
security manner. I have very low knowledge about them, so therefore the
question. And if you think this question is unethical, and the rest of the
society does that, we would probably not have as secure technology regarding
cookies _as you state it is_. Rethink you answer a bit...
As a developer I would like to know if someone can view the cookies that are
not authorized to do so. Sorry for wanting to learn more...
http://en.wikipedia.org/wiki/HTTP_cookie#Privacy_and_third-party_cookies
Cheers
Richard
--- End Message ---
--- Begin Message ---
Thank you, great reading :)
-----Original Message-----
From: Richard Collyer [mailto:[EMAIL PROTECTED]
Sent: Friday, June 30, 2006 5:01 AM
To: [email protected]
Subject: Re: [PHP] RE: Find out cookies on a computer?
Peter Lauri wrote:
> Is the question dumb? Why you answer it then? It is very interesting in a
> security manner. I have very low knowledge about them, so therefore the
> question. And if you think this question is unethical, and the rest of the
> society does that, we would probably not have as secure technology
regarding
> cookies _as you state it is_. Rethink you answer a bit...
>
> As a developer I would like to know if someone can view the cookies that
are
> not authorized to do so. Sorry for wanting to learn more...
http://en.wikipedia.org/wiki/HTTP_cookie#Privacy_and_third-party_cookies
Cheers
Richard
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
weetat wrote:
Hi all ,
I have using PEAR:Pager , to do paging .
If you have a pear question, ask on the pear mailing list.
http://pear.php.net/support/
We do not know their code or how to use it.
--
Postgresql & php tutorials
http://www.designmagick.com/
--- End Message ---
--- Begin Message ---
Jay Blanchard wrote:
Recommended reading....
http://zirzow.dyndns.org/php-general/NEWBIE
Should we add a link to the pear support page for pear related questions?
Something as simple as:
"If you have a question about any of the pear packages, join the
appropriate list here: http://pear.php.net/support/lists.php"
--
Postgresql & php tutorials
http://www.designmagick.com/
--- End Message ---
--- Begin Message ---
This was listed in another thread but I think would be a great tool
and online refference for any one who is programming in PHP and
especially for NEWBIES.
http://www.hudzilla.org/phpbook/
note: This is one of the best reads I have seen, both online and in print.
On 6/29/06, Chris <[EMAIL PROTECTED]> wrote:
Jay Blanchard wrote:
> Recommended reading....
>
> http://zirzow.dyndns.org/php-general/NEWBIE
Should we add a link to the pear support page for pear related questions?
Something as simple as:
"If you have a question about any of the pear packages, join the
appropriate list here: http://pear.php.net/support/lists.php"
--
Postgresql & php tutorials
http://www.designmagick.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
hi...
in getting information on xpath/xml.. i thought i'd ask these lists as
well...
i'm trying to find out if there's a tool that i could use to load an HTML
web page into, that would allow me to point to a given item/element within
the Tree/DOM structure and allow me to see what the Xpath statement would be
to generate that given itm/element of the Tree...
i've seen a few tools but none that have exactly what i'm looking for...
has anyone knowledge of any kind of tool/plugin like this? i'd also like to
hear your comments pro/con of the tool if you've actually used it!!
thanks
-bruce
--- End Message ---