[PHP] Introduction and questions...

2007-01-09 Thread Pedro Mpa
-Original Message-
From: Jason Pruim [mailto:[EMAIL PROTECTED] 
Sent: terça-feira, 9 de Janeiro de 2007 17:37
To: php-general@lists.php.net
Subject: [PHP] Introduction and questions...

Hi Everyone, I'm very new to php and to this list. I'm hoping to be  
able to suck up as much knowledge from this list as I possibly can  
and be able to help and contribute in the future.

But until that time, I'm in need of some help.

I'm trying to write an image gallery script(Or program/application?)  
for displaying images on a web page. That part of it is working just  
fine, what I want to add though is the ability for people who use  
this script to be able to copy/paste a link to insert the HTML into  
their page/weblog.

In other words... How do I get it to display the text: img  
src=myserver.com/path/to/picture height=reasonable size instead  
of actually displaying the picture? 
=
Check htmlentities on www.php.net/htmlentities.
It converts   and other characters to their correspondent html entities
(http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/re
ference/charsets/charset2.asp )
=

Here is a copy/paste from the  
code I've been using:
if ($i = '5')// column count  
(designed for 5 columns wide - change the 5 for however many wanted)
 {
 $i = $i + '1';
 echo 'td align=left width=115  
height=100
 a href='.$filename.'img src='. 
$filename.' height=60 border=0 //abr /
 font size=1 face=tahoma'. 
$filename.'br /'.filesize($filename).' bytes. BR / link info:  
img src=quot;http://www.raoset.com/media/images/texas/images/'. 
$filename.'quot; height=50% /font
 /td

I have tried another more robust script but this is the one I'm  
currently working with. I'm usually a quick learner but right now I'm  
just lost, and I can't see the trees through the forest.I'm pretty  
sure I'm using php4.*, If someone can tell me where exactly to find  
that I would be more then happy to tell you the EXACT version I'm  
using. :) I'm not real good on the command line YET... It's another  
one of my many projects filed under CRITICAL Ahhh... The joys of a  
small business and wearing many many hats :)
=
Check www.php.net/phpinfo.
1. Create a php file onn your webserver named phpinfo.php.
2. Insert the following code:
?php
phpinfo();
?
3. Call the script from your browser.
=

Anyway... Long enough post for my question I think, if you need more  
info let me know, and thanks in advance for any help even if it's  
just a RTFM... Just please include TFM ;)

-- 

Jason Pruim
[EMAIL PROTECTED]
Production  Technology Manager
MQC Specialist (2005 certified)
3251 132nd Ave
Holland MI 49424
616.399.2355
www.raoset.com


We hold these truths to be self-evident. That all men are created  
equal, that they are endowed by their creator with certain  
unalienable rights, (and) that among these are Life, Liberty, and the  
pursuit of Happiness.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Hidding HTML Input Elements values approach

2006-03-14 Thread pedro mpa
 -Mensagem original-
 De: David Dorward
 So the value attribute contains an encrypted representation of the country
 name ... which is transmitted in clear text right next to it?
 
 If you want encryption, why not just use SSL?

The value attribute contains an encrypted value of a row id in the database
table for countries. How would I know which country the user has selected if
I don't know its row id to insert on a members table (either plain, masked
or encrypted)?

 name ... which is transmitted in clear text right next to it?

What is posted is the value attribute of the option elements not the country
text (do a print_r($_POST)).

Suppose you are on a Private Area on a website after login and you might
have links such as:
a href=page.php?changeprefsPreferences/a
a href=page.php?op=3Change Password/a
a href=site/changeemailChange E-mail/a

In my approach these links would be like:
a href=page.php?ad6467ae6757Preferences/a
a href=page.php?op=97874bd86a4a5Change Password/a
a href=site/97874bd86a4a5Change E-mail/a - for this you need ht access
on apache -I think-

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Hidding HTML Input Elements values approach

2006-03-13 Thread pedro mpa
Greetings.

I would like some feedback on this approach for encrypting HTML input
element values such as Checkbox, Radio, Select, Hidden, etc, and Javascript
code related to those elements.

The procedure is when a user first arrives at the site a session structure
is created and in it I create a random key string to use on encryption
functions for every page requested by that specific user.

So, for example a typical country select box, its option values are
encrypted with the previous created key on page request and decrypted (after
form submission f.ex.) on the validation code:

form
  input type=hidden name=op value=aba87bdbs897a87e9986ab76
  select name=country
option value=aba7b6a76d6eb76bf98ab986ab76Country Name/option
  /select
/form

function ExampleValidation(){
  // ...
  $country_id = isset($_POST['country']) ?
MyDecryptFunction($_POST['country']) : 0 ;
  // etc...
}

I also use this approach to encrypt values in Querystrings such as ids,
operations, form steps, etc.

So far I haven't found any holes on this approach (except when someone
gets access to the hosting account :] ) so I would like some feedback and/or
ideas and/or other approaches.


Thanks in advance.


Apologies for my bad English.

Pedro.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Hidding HTML Input Elements values approach

2006-03-13 Thread pedro mpa
 -Mensagem original-
 De: jblanchard
 I don't see any problem with the approach, but I would ask why...

Because if I write original ids or values matching those on database (or
other data source) they can easily be changed on client side, that is the
main purpose. Another purpose is to easily allow forward/back on a form with
several steps without showing the 'internal step' and avoid the The page
you requested has expired; Increased security (I think, that's why I
posted) because the encryption key is different for every user/visit to the
site (not page). The project in question has several long forms and
different types of payments (sms, unique cc number, etc).

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] php versions between os/platform

2006-02-10 Thread pedro mpa
Greetings!

I am building a website using PHP 5.1.2 and MySQL 5.0.18 and I am using
windows xp with IIS.
All the hosting companies I have contacted are using php 4.x.x and mysql
4.x.x or 3.x.x, on linux I suppose.

Are php versions the same for every os/platform?

Thanks in advance.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] moving website from windows to linux hosting

2005-10-24 Thread pedro mpa
Hi!

I have to move my website from Windows hosting to a linux hosting machine.
Does anyone have special tips, procedures I should consider?
(Like changing directory paths from \ to / ).

It's a classifieds posting website and it's in final testing stage.

Pedro.
Apologies for my bad English.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] [off T] c++ mailing list

2005-08-26 Thread pedro mpa
Hello

Sorry for this OT post but is there a c++ mailing list like this one?


~Pedro. 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php