php-general Digest 30 May 2008 20:08:57 -0000 Issue 5488

Topics (messages 274873 through 274887):

Re: Embed images in emails
        274873 by: Iñigo Medina García
        274874 by: Iñigo Medina García
        274882 by: Shawn McKenzie

Re: validating # sign in php
        274875 by: Robin Vickery

Re: PHP Code I Must find
        274876 by: Thijs Lensselink

Re: PHP eg.
        274877 by: Dan Joseph
        274879 by: Gabriel Sosa
        274880 by: Jason Pruim
        274881 by: Eric Butera

Re: A bit 0T - WAMPSERVER
        274878 by: Ryan S

phpeclipse debugging & setup
        274883 by: PJ
        274885 by: Eric Butera

hello
        274884 by: Stéphane Boisvert

Fake emails sent on my behalf
        274886 by: Stéphane Boisvert

PHP and Web Services [JIVE]
        274887 by: VamVan

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 ---
Aha, I see.
Perfect, Per. I'll look at this RFC.

  iñigo

> Iñigo Medina García wrote:
> 
>> Hi Per,
>>
>> yep, it's true, playing with mime it can be sent as attachment, but I
>> don't want that but embed.
>>
>>    iñigo
> 
> OK, then you need to revisit what Bastien said.  However, instead of
> <img> referring to an external image, you need to use
> src="cid:nnnnnnnn" where 'nnnnnnn' will refer to an attached image file
> with a Content-ID header.  It may sound a little complicated, but it's
> not really difficult - if you want to know more, see RFC2111.
> 
> 
> /Per Jessen, Zürich
> 
> 


-- 
--------
Iñigo Medina García                     
Librería Díaz de Santos         
Madrid (Spain)
Dpt.Desarrollo

--- End Message ---
--- Begin Message ---

> Iñigo Medina García wrote:
>> Hi Chris,
>>
>> yep, phpmailer is a good work too. But it works the same i said about
>> htmlMimeMail5.
> 
> So use either package to figure out what it does and how it does it -
> you can learn a lot from other peoples code.

Thanks for the advice. :-)

  iñigo

-- 
--------
Iñigo Medina García                     
Librería Díaz de Santos         
Madrid (Spain)
Dpt.Desarrollo

--- End Message ---
--- Begin Message ---
Per Jessen wrote:
Iñigo Medina García wrote:

Hi Per,

yep, it's true, playing with mime it can be sent as attachment, but I
don't want that but embed.

   iñigo

OK, then you need to revisit what Bastien said.  However, instead of
<img> referring to an external image, you need to use
src="cid:nnnnnnnn" where 'nnnnnnn' will refer to an attached image file
with a Content-ID header.  It may sound a little complicated, but it's
not really difficult - if you want to know more, see RFC2111.


/Per Jessen, Zürich


Or just send it as an inline attachment.

-Shawn

--- End Message ---
--- Begin Message ---
2008/5/29 Sudhakar <[EMAIL PROTECTED]>:
> my question is about validation using php. i am validating a username which
> a user would enter and clicks on a image to find
>
> if that username is available. example if a user enters abc#123 php file is
> reading this value as abc ONLY which i do not
>
> want instead the php file should read as abc#123. following is the sequence
> of pages. please advice the solution.

You've asked this question at least three times now that I've seen,
and you've already had the answer.

The problem is not in PHP, it's in your javascript:

> var useri = document.registrationform.username
> var valueofuseri = document.registrationform.username.value
> [...]
> window.open("checkusernamei.php?theusernameis="+valueofuseri,
> "titleforavailabilityi", "width=680,  height=275, status=1,

You must urlencode valueofuseri.

-robin

--- End Message ---
--- Begin Message ---
Quoting John Taylor-Johnston <[EMAIL PROTECTED]>:

Seen that in the manual. I'll need a routine of some sort I guess.
I'll get my cookie cutters out tomorrow and see what I can create.
I make cool gingerbread men, for a dude.
**htmlentities() does most of what I want, sort of.

**lists-php wrote:
you might try looking at the php manual. start with: http://www.php.net/manual/en/function.ord.php and go from there.

<?php
$mystring = "[EMAIL PROTECTED]";
# How can I generate $mystring in ascii characters?
echo ($mystring in ascii charachters);
?>



lists-php wrote:

that's not UTF, rather just the html representation of the ascii
codes for the characters. [someone else has already pointed you to
an ascii table.]

when put in the context of the "mailto:"; it's actually fairly easy
for a bot to identify and decode (i'm not saying that they do, but
it's not hard). if you're going to use this approach you may want
to make the e-mail addresses user-readable, but unlinked. while
still easily decoded, most bots won't waste time trying to decode
every string like that that they encounter (at least not yet).

 - Rick


------------ Original Message ------------

Date: Thursday, May 29, 2008 07:08:34 PM -0400
From: John Taylor-Johnston <[EMAIL PROTECTED]>
To: PHP-General <[EMAIL PROTECTED]>
Subject: [PHP] PHP Code I Must find

A web site deploys what I think are UTF characters to mask email
addresses.
Is there there a php function I can use to generate this? Or was
this hand-done?
It is crackable, but a darned good stab at the problem of spiders
at the same.
Any feedback, info or code would be appreciated,
John

John Taylor-Johnston wrote:

My source is this page:
http://www.grandlodge.mb.ca/contact.html
John


/<div align="center">To report a technical problem with this
site please <a href="mailto:&#119;&#101;&#098;&#109;&#097;&#115;&#116;&#101;&#
11
4;&#064;&#103;&#114;&#097;&#110;&#100;&#108;&#111;&#100;&#103;&
#1 01;&#046;&#109;&#098;&#046;&#099;&#097;">contact  the
webmaster</a>.</div>/

/In UTF code:

mailto:&#119;&#101;&#098;&#109;&#097;&#115;&#116;&#101;&#114;&#
06
4;&#103;&#114;&#097;&#110;&#100;&#108;&#111;&#100;&#103;&#101;&
#0 46;&#109;&#098;&#046;&#099;&#097;

would be this in latin characters:

mailto:[EMAIL PROTECTED]/

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

---------- End Original Message ----------




---------- End Original Message ----------




--

You could do something like this (knowing the strings are pure ascii)

function ascToEnt($string) {
    $char = '';
    $strLength = strlen($string);
    for ($x = 0; $x < $strLength; $x++) {
        $char .= '&#' . ord($string{$x}) . ';';
    }
    return $char;
}

echo ascToEnt('[EMAIL PROTECTED]');



--- End Message ---
--- Begin Message ---
On Fri, May 30, 2008 at 2:34 AM, mukesh yadav <[EMAIL PROTECTED]> wrote:

> Hi,
>  I'm trying to learn a PHP by myself...and i need a help.
> I have learned all the basic but i dont know how to implement the stuff.
> Can you please guys help me out give me a small site in PHP so that i can
> study and learn.
>
> thank you.
>

Best thing to do is stay on this mailing list, and use php.net,
phpbuilder.com, and other php web sites as a reference.  There are a lot of
code examples out there.  Come up with a project, and start coding.

-- 
-Dan Joseph

www.canishosting.com - Plans start @ $1.99/month.

"Build a man a fire, and he will be warm for the rest of the day.
Light a man on fire, and will be warm for the rest of his life."

--- End Message ---
--- Begin Message ---
welcome,

first depending on wich OS are you running you install php mysql and
apache (at least)

over windows i recomend you
http://www.appservnetwork.com/

over linux.. you must find some tutorial on
http://www.howtoforge.com/

and then try
http://tinyurl.com/4dyblz

saludos

On Fri, May 30, 2008 at 3:34 AM, mukesh yadav <[EMAIL PROTECTED]> wrote:
> Hi,
>  I'm trying to learn a PHP by myself...and i need a help.
> I have learned all the basic but i dont know how to implement the stuff.
> Can you please guys help me out give me a small site in PHP so that i can
> study and learn.
>
> thank you.
>



-- 
Los sabios buscan la sabiduría; los necios creen haberla encontrado.
Gabriel Sosa

--- End Message ---
--- Begin Message ---
Hi Mukesh,

II am in the same spot... the best thing I can recommend to you, is when someone posts a problem to this list, try and work out the example and figure out how they are doing it.

One of the posters on this list, does that, and has a great code library with examples on his website. www.webbytedd.com lots of fun to look at... And to try and figure out how he did it ;)

I'm sure lots of other people have the same thing, I just don't know about it. :) And I am working on my own library, but it's not real good yet and there won't be much more for awhile since I'm going on vacation to sunny florida today :)

Anyway, just wanted to chime in with my experience and knowledge and to encourage you :)

Good luck!


On May 30, 2008, at 2:34 AM, mukesh yadav wrote:

Hi,
 I'm trying to learn a PHP by myself...and i need a help.
I have learned all the basic but i dont know how to implement the stuff. Can you please guys help me out give me a small site in PHP so that i can
study and learn.

thank you.

--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424-9337
www.raoset.com
[EMAIL PROTECTED]




--- End Message ---
--- Begin Message ---
On Fri, May 30, 2008 at 2:34 AM, mukesh yadav <[EMAIL PROTECTED]> wrote:
> Hi,
>  I'm trying to learn a PHP by myself...and i need a help.
> I have learned all the basic but i dont know how to implement the stuff.
> Can you please guys help me out give me a small site in PHP so that i can
> study and learn.
>
> thank you.
>

The way I started was just a desire to know how to make this web thing
work.  So I came  up with the idea to make a page that would show some
current information I've posted and have the ability to
add/edit/delete this information.  Everything else fell in line once I
had the idea of what I wanted to happen.  I had to research pulling
and putting records into mysql.  It was a horrible mess compared to
what I do now, but you have to get your feet wet somehow.

Find something you want to accomplish.  It gives you specific
requirements and fulfilling them is where you really learn.  After you
complete your project, do another one.  Along the way you'll learn
what does and doesn't work.

The first script I ever really tried to work on was loosely based
around this article [1].  There are lots of issues I have with the
code but it is what I started out with.  It shows the basics of
working with mysql and the whole record workflow.  Some of the main
issues I have are:
- or die() is not error handling
- no escaping of raw data on output
- lack of data validation on user input

These issues aren't as important if it is a local pet project.  If you
plan on making this more than a weekend hobby though, please make sure
to read up on the security side of things also. [2]  For a more in
depth look see the OWASP Guide. [3]

Good luck!

[1] http://www.melonfire.com/community/columns/trog/article.php?id=280
[2] http://phpsec.org/library/
[3] http://www.owasp.org/index.php/Guide_Table_of_Contents

--- End Message ---
--- Begin Message ---
<clip
STW?

http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html
</clip>

Thanks,
I did STW and find that link but am just a bit unsure if  while WAMPSERVER2 I 
should go in and do it like the above url suggests... was wondering if like 
XAMPP there were specific instructions to follow.

Cheers!
R



      

--- End Message ---
--- Begin Message ---
Running FreeBSD 7.0, Eclipse SDK 3.3.2, java 1.6.0_03-p4, apache 2.2.8,
php5.2.6, postgresql 8.3.1.

I found that configuring Xdebug just does not work the way all the
manuals, instructions and hints suggest: the only way I could get Xdebug
to work (but does it?), that is, to show up under phpinfo() as both the
zend module and xdebug module was to enter only zend_extension=xdebug.so
in php.ini (with the other configuration parameters) but NOT adding it
to the extensions.ini file.

phpeclipse seems to be working - HOWEVER, it does not ignore php
comments and commented out instructions and the PHP Browser does not
seem to be working.
Such errors as "pg_exec, pg_errormessage() pg_free_result(),
pg_num_rows() & others: supplied argument is not a valid PostgreSQL link
resource" are not caught.
Strangely, the Firefox plugin DBGbar catches these errors...  ???

What are Bookmarks in phpEclipse? Are they meant to be breakpoints?
Why does the PHPbrowser (internal) not work?
Why does the preferences page not show PHP Web developing?
Why is only MySQL included and not postgresql in the setup?

Any suggestions, explanations, instructions, sources of information
would be appreciated.
PJ









--- End Message ---
--- Begin Message ---
On Fri, May 30, 2008 at 11:59 AM, PJ <[EMAIL PROTECTED]> wrote:
> Running FreeBSD 7.0, Eclipse SDK 3.3.2, java 1.6.0_03-p4, apache 2.2.8,
> php5.2.6, postgresql 8.3.1.
>
> I found that configuring Xdebug just does not work the way all the
> manuals, instructions and hints suggest: the only way I could get Xdebug
> to work (but does it?), that is, to show up under phpinfo() as both the
> zend module and xdebug module was to enter only zend_extension=xdebug.so
> in php.ini (with the other configuration parameters) but NOT adding it
> to the extensions.ini file.
>
> phpeclipse seems to be working - HOWEVER, it does not ignore php
> comments and commented out instructions and the PHP Browser does not
> seem to be working.
> Such errors as "pg_exec, pg_errormessage() pg_free_result(),
> pg_num_rows() & others: supplied argument is not a valid PostgreSQL link
> resource" are not caught.
> Strangely, the Firefox plugin DBGbar catches these errors...  ???
>
> What are Bookmarks in phpEclipse? Are they meant to be breakpoints?
> Why does the PHPbrowser (internal) not work?
> Why does the preferences page not show PHP Web developing?
> Why is only MySQL included and not postgresql in the setup?
>
> Any suggestions, explanations, instructions, sources of information
> would be appreciated.
> PJ

I used to use phpeclipse.  I dumped it for PDT though.  I never could
get the debugging to work with phpeclipse.  PDT for Eclipse debugging
features work with xdebug & the zend debugger.  Give it a look.

--- End Message ---
--- Begin Message ---
Dear Madam/sir,
 We are a wholesaler  which deal with all kinds of such electronic products
as motorcycles, TV, Notebooks, Phones, Psp,  Projectors, GPS, DVD, DV, DC,
MP3/4, musical instruments, toys, watches and so on. We can offer quality
goods with reasonable  price. We deliver our items by EMS to our customers
around the world,
When you have time, welcome to visit our website and contact us. Thanks.
If you have any question, please don't hesitate to let us know. We will glad
to help you.
Welcome to our website and enjoy your purchasing.
Our website: { www.setgert.com }
Mail:{ [EMAIL PROTECTED] }
Mail:{ [EMAIL PROTECTED] }
MSN: { [EMAIL PROTECTED] }
I hope to hear from you soon.

--- End Message ---
--- Begin Message ---
Please disregard all emails received from this account with a subject line
hello,
my password and security question were compromised through what seems to be
a  Cross Site Scripting attack.

My sincerest apologies to everyone.

-Stéphane

--- End Message ---
--- Begin Message ---
Hello All,


I am trying to make a web service call using SOAP and PHP to create a new
community. I keep on receiving unauthorized exception. Please let me know
what I forgot in my code here.
How is it possible to send authentication headers in a SOAP call?

I would appreciate if some one could post some code here to make things
clear.


Thanks

CODE



$sso_wsdl_url_getemail = "
http://XXXXXXXX:8080/rpc/soap/CommunityService?wsdl";;<http://xxxxxxxx:8080/rpc/soap/CommunityService?wsdl%22;>
$client = new SoapClient($sso_wsdl_url_getemail, array(
'login' => "XXXXXX",
'password'=> "XXXXX",
'proxy_host' => "XXXXXXX",
'proxy_port' => 3128,
'exceptions' => 0,
'encoding' => "UTF-8",
'connection_timeout' => 60
));

$input = array();

$input['name'] = "Just A Small Test";
$input['disp'] = "Just Check it";
$input['desc'] = "Check it";

$result = $client->createCommunity($input);

print_r($result);

--- End Message ---

Reply via email to