php-general Digest 6 Feb 2006 02:55:43 -0000 Issue 3947

Topics (messages 229895 through 229909):

Re: Help with mysql_query and INSERT INTO
        229895 by: Colin Davis

Re: xml to array
        229896 by: Brian V Bonini

Re: Reverse Engineering of Smarty
        229897 by: tedd
        229900 by: Sumeet
        229901 by: Patrick Aljord
        229903 by: Zareef Ahmed
        229904 by: Robert Cummings
        229907 by: Zareef Ahmed
        229908 by: Rory Browne

Sound
        229898 by: tedd

Re: need help to update a mysql table from dynamic form
        229899 by: Patrick Aljord

Re: Using API in other languages
        229902 by: Rory Browne

Resource use reading from file system
        229905 by: Brian Dunning
        229906 by: Robert Cummings

problem with Mail function
        229909 by: Tariq Dalvi

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:
        php-general@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
Thank you, that is perfect.

Regards
Colin Davis
http://www.ukpages.org

"Johan Martin" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> http://www.php.net/manual/en/function.mysql-insert-id.php
> This will give you the record id of the last record inserted (or created).
>
> Johan Martin
> Catenare LLC
> 534 Pacific Ave
> San Francisco, CA. 94133
> Phone: (415) 834-9802
> Fax: (415) 294-4495
> http://www.catenare.com
>
> AOL: catenarellc
> Yahoo: martin_johan
> MSN: [EMAIL PROTECTED]
> GTalk: [EMAIL PROTECTED]
>
> FWD: 716798 

--- End Message ---
--- Begin Message ---
On Sun, 2006-02-05 at 06:32, Tod Thomas wrote:
> Just a quick shot it the dark...
> 
> http://www.w3.org/TR/REC-xml/#NT-Name
> 
> Go up about a half page to this:
> 
> "[Definition: A Name is a token beginning with a letter or one of a few 
> punctuation characters, and continuing with letters, digits, hyphens, 
> underscores, colons, or full stops, together known as name characters.] 
> Names beginning with the string "xml", or with any string which would 
> match (('X'|'x') ('M'|'m') ('L'|'l')), are reserved for standardization 
> in this or future versions of this specification."...
> 
>  From quick read maybe if you wrap the numbers in quotes that might work?

Right on... Making it work is pretty much a non-issue... I can always
prepend something to the string, e.g.,
<idx_0>foo</idx_0>
<idx_1>bar</idx_1>
etc.

Just was not aware if an int. was actually and invalid token... Could
not recall ever seeing it used, but, could also not ever recall reading
it was not OK.... Learn something new everyday... Thanks for finding
that in the spec...

-Brian


-- 

s/:-[(/]/:-)/g


Brian        GnuPG -> KeyID: 0x04A4F0DC | Key Server: pgp.mit.edu
======================================================================
gpg --keyserver pgp.mit.edu --recv-keys 04A4F0DC
Key Info: http://gfx-design.com/keys
Linux Registered User #339825 at http://counter.li.org

--- End Message ---
--- Begin Message ---
Hi All,

Accidentally I got deleted all of my php code in one of my application, I was using smarty and its compiled directory has the code in its native format.

Is there any way so I can do some type of reverse engineering to bring back my original code?

Any suggestion?

Thanks in advance.

Zareef Ahmed


Yeah, like that's what happened.

tedd

--
--------------------------------------------------------------------------------
http://sperling.com/

--- End Message ---
--- Begin Message ---
Rory Browne wrote:
If you don't have backups, then:

 1: Why do you not have backups?
 2: Are you insane?

hmm..... totally uncalled for ....

--
Sumeet Shroff
http://www.prateeksha.com
Web Design and Ecommerce Development, Mumbai India

--- End Message ---
--- Begin Message ---
There is unfortunately no way to reverse your code back, the only
thing you can do is google for "file recovery techniques" or just
recode the whole thing. If you don't have time for that, maybe
something like http://www.joomla.org/ could save your day.

Hope that helps

Pat

On 2/5/06, Zareef Ahmed <[EMAIL PROTECTED]> wrote:
> Hi All,
>
>  Accidentally I got deleted all of my php code in one of my application, I 
> was using smarty and its compiled directory has the code in its native format.
>
> Is there any way so I can do some type of reverse engineering to bring back 
> my original code?
>
> Any suggestion?
>
> Thanks in advance.
>
> Zareef Ahmed
>

--- End Message ---
--- Begin Message ---
---- Original Message ----- 
From: "Rory Browne" <[EMAIL PROTECTED]>
To: "Zareef Ahmed" <[EMAIL PROTECTED]>
Cc: <php-general@lists.php.net>
Sent: Sunday, February 05, 2006 8:39 AM
Subject: Re: [PHP] Reverse Engineering of Smarty


If you don't have backups, then:

 1: Why do you not have backups?
 2: Are you insane?
 3: What filesystem, and file recovery techniques have you
researched/attempted?
 4: Why do you not have backups?
 5: Are you insane?

NO I am not insane.. but it happens sometime...
I have recovered it from my file system

Zareef Ahmed

--- End Message ---
--- Begin Message ---
On Sun, 2006-02-05 at 01:12, Sumeet wrote:
> Rory Browne wrote:
> > If you don't have backups, then:
> > 
> >  1: Why do you not have backups?
> >  2: Are you insane?
> 
> hmm..... totally uncalled for ....

I don't know that it's "uncalled for". I think Rory was drawing to
attention that not having some kind of backup of important code is
tantamount to incompetence. I would have to agree with Rory that if the
code was important enough to seek a method of reverse engineering to
retrieve the original, then some kind of system should have been in
place long ago. Might I suggest CVS? I would have to say that "are you
insane" is a bit softer on the ego than "are you a complete moron".

Cheers,
Rob.
-- 
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for       |
| creating re-usable components quickly and easily.          |
`------------------------------------------------------------'

--- End Message ---
--- Begin Message ---
Hi All,

          A lot of  talk on that topic.

Actually project was very small, Accidentally deleted that,  was going to
restore it from backup on other filesystem, then just thought that there
must be something that can restore from compiled code. So ask the question
in this prestigious group,

Rightly I got good adjectives ;)

Well I am using CVS for all of my projects and do regular backups. Above all
filesystem restore is also available in most of such cases.

Lets close this thread,  we people really have many meaningful questions to
answers.

  Zareef Ahmed



----- Original Message ----- 
From: "Robert Cummings" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: "PHP-General" <php-general@lists.php.net>
Sent: Sunday, February 05, 2006 2:46 PM
Subject: Re: [PHP] Reverse Engineering of Smarty


> On Sun, 2006-02-05 at 01:12, Sumeet wrote:
> > Rory Browne wrote:
> > > If you don't have backups, then:
> > >
> > >  1: Why do you not have backups?
> > >  2: Are you insane?
> >
> > hmm..... totally uncalled for ....
>
> I don't know that it's "uncalled for". I think Rory was drawing to
> attention that not having some kind of backup of important code is
> tantamount to incompetence. I would have to agree with Rory that if the
> code was important enough to seek a method of reverse engineering to
> retrieve the original, then some kind of system should have been in
> place long ago. Might I suggest CVS? I would have to say that "are you
> insane" is a bit softer on the ego than "are you a complete moron".
>
> Cheers,
> Rob.
> -- 
> .------------------------------------------------------------.
> | InterJinn Application Framework - http://www.interjinn.com |
> :------------------------------------------------------------:
> | An application and templating framework for PHP. Boasting  |
> | a powerful, scalable system for accessing system services  |
> | such as forms, properties, sessions, and caches. InterJinn |
> | also provides an extremely flexible architecture for       |
> | creating re-usable components quickly and easily.          |
> `------------------------------------------------------------'
>
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

--- End Message ---
--- Begin Message ---
On 2/5/06, Sumeet <[EMAIL PROTECTED]> wrote:
>
> Rory Browne wrote:
> > If you don't have backups, then:
> >
> >  1: Why do you not have backups?
> >  2: Are you insane?
>
> hmm..... totally uncalled for ....
>
>
"Are you insane?" isn't considered rude where I'm from or anywhere I've
been?

If I'd wanted to be insulting there are a lot worse things I could have
said.

I also wanted to draw attn to the fact that backups aren't a bad thing (tm)

--- End Message ---
--- Begin Message ---
Hi gang:

Does anyone know a way to generate a sound (bell, click, tone, peep, buzz, word) from php?

tedd
--
--------------------------------------------------------------------------------
http://sperling.com/

--- End Message ---
--- Begin Message ---
On 2/4/06, Sumeet <[EMAIL PROTECTED]> wrote:
> Patrick Aljord wrote:
> > could someone please help me on that one? 
> > http://hashphp.org/pastebin?pid=6156
> >
> > basically this is how I do:
> > I display a mysql table in an html table and I put each value in an
> > input text box.
> > At the bottom I put a submit button to update changes.
> > My question is how do I update everything knowing that I don't know in
> > advance the name of all the input textbox?
> >
> > Here is the code to display the table:
> >  <table width=\"1\" border=\"1\">
> >    <tbody>
> >      <tr>
> >        <td><strong>English</strong></td>
> >        <td><strong>Fran&#231;ais</strong></td>
> >        <td><strong>Espa&#241;ol</strong></td>
> >
> >      ";
> >  $getdisplaycatname = "select
> > catid,categoryfr,categoryen,categoryes,categoryar from category";
> >  $getdisplaycatnameq = mysql_query($getdisplaycatname);
> >  while ($getcatrow = mysql_fetch_array($getdisplaycatnameq)){
> >  //$display_category=mysql_result($getcatnameq, 0);
> >  $showcatid=$getcatrow['catid'];
> >  $showcat=$getcatrow['categoryfr'];
> >  $showcaten=$getcatrow['categoryen'];
> >  $showcates=$getcatrow['categoryes'];
> >  echo "  <tr>
> >        <td> <input type=\"text\" name=\"<????>\" value=\"$showcaten\"
> > size=\"18\"/></td>
> >        <td> <input type=\"text\" name=\"<????>\" value=\"$showcat\"
> > size=\"18\"/></td>
> >        <td> <input type=\"text\" name=\"<????>\" value=\"$showcates\"
> > size=\"18\"/></td>
> >      </tr>
> >   ";
> >  }
> >  echo "
> >  </tr>
> >    </tbody>
> >  </table>
> >  <br /><input type=\"submit\" name=\"update\"  value=\"update\" /></form>
> >
> >  ";
> >  thanx in advance
> >
> > Pat
> >
>
> not sure of exactly u r try to do...but i can suggest the following code.
>
> while ($getcatrow = mysql_fetch_array($getdisplaycatnameq)){
>
>    /* assuming getcatrow is an array like
>     getcatrow = array( "field1" => "value1",
>                        "field2" => "value2");
>
>   */
>
>    while( list($key,$value) = each($getcatrow) ) {
>         echo "<input type='text' name='$key' value='$value'
>  > size='18'/>";

Thanx a lot for your answer, but the problem is that for each $key I
have 3 column with the same id: categoryen, categoryfr and categoryes.
So that gives me three input type=text name=$key with the same $key
for the three categories then it goes to the next row. How can I make
the difference between the input text that have the same name when
updating?
see what I mean?

Thanx in advance
Pat

--- End Message ---
--- Begin Message ---
My point when I suggested that your best hope was something like
webservices was your best hope, was that there is no glue code(that I
know of) system.

Having that said, it just occured to me that phlanger and roadsend
provide this functionality. I forgot about these originally because
they're licensed under unacceptable licence terms (ie they require
payment, or don't allow you to redistribute, or to access source)

--- End Message ---
--- Begin Message --- I built a quick & dirty photo gallery that reads the file system to display filenames of all the images in each folder. As traffic increases, will it save system resources if I have a cron job write include files with the contents of each folder? Is the processor taxed much more to read ~10 files from a folder, than to read a single include file? I know it's less, but I wonder if the difference is really all that significant.
--- End Message ---
--- Begin Message ---
On Sun, 2006-02-05 at 14:49, Brian Dunning wrote:
> I built a quick & dirty photo gallery that reads the file system to  
> display filenames of all the images in each folder. As traffic  
> increases, will it save system resources if I have a cron job write  
> include files with the contents of each folder? Is the processor  
> taxed much more to read ~10 files from a folder, than to read a  
> single include file? I know it's less, but I wonder if the difference  
> is really all that significant.

It depend son how often those files are accessed. The OS usually
performs some kind of caching itself so that the overhead is minimized.
Either way it doesn't sound like a particularly good point for
optimization.

Cheers,
Rob.
-- 
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for       |
| creating re-usable components quickly and easily.          |
`------------------------------------------------------------'

--- End Message ---
--- Begin Message ---
Hello everyone,

I m using php mail function it dose everyting fine besides it prints
message twise in the email body can someone please have a look
what i m doing wrong the code is as follows :

$to = "$email";
$subject = "someting goes here \n\n";
$headers = "From: [EMAIL PROTECTED]" .
"X-Mailer: Mailserver at somewhere.com\n" .
"Date: $date\n" .
"MIME-Version: 1.0\n" .
"Content-Type: text/plain; charset=ISO-8859-1\n" ;

message <<<EOF
...................
.......................
.........................
.....
...
EOF;

 if (mail($to,$subject,$message,$headers)){

   $say = "<p />E Mail sent successfully to $email. <br>";
  }
else{

$say = "\n\n<p />Ohoho! Sending failed Please inform to Webmaster. <br>";

}

I shall highly appreciate any help

Thanks
Tariq

--- End Message ---

Reply via email to