RE: [PHP] PHP code problem with pages

2012-01-22 Thread HallMarc Websites
> 
> Maybe my subject line is not descriptive as I wish, but I just did not
know
> how to put on it.
> 
> I have the following problem, I'm using jQuery to make a slide effect
> (horizontal), everything seems to be working find, but I have to add a
mask
> with a white color background, I did this by CSS, now I have 6 pages in
total,
> this is managed by wp anyway, it shows the white bakground mask in every
> page, and I want it to show in every page but not the home page; 
[>] 

Carlos, this looks like it would better suit your support needs to post this
question on the wordpress.org forums. Here is what I can tell you, you need
to make use of the functions built into WP and the theme you are using. The
function(s) you need to use are as such:
is_front_page();
is_home_page();
is_page();
etc and you can find the documentation in the Wordpress Codex here
http://codex.wordpress.org/Conditional_Tags 

You could, alternatively, create your slider as a plugin; create a shortcode
hook, and then call the sliders to the page with the shortcode in the
dashboard WYSIWYG for that page/post.

Marc Hall
HallMarc Websites


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



Re: [PHP] PHP code problem with pages

2012-01-21 Thread Daniel Brown
On Sat, Jan 21, 2012 at 20:07, Carlos Sura  wrote:
> Hello Mates,
>
> Maybe my subject line is not descriptive as I wish, but I just did not know
> how to put on it.
>
> I have the following problem, I'm using jQuery to make a slide effect
> (horizontal), everything seems to be working find, but I have to add a mask
> with a white color background, I did this by CSS, now I have 6 pages in
> total, this is managed by wp anyway, it shows the white bakground mask in
> every page, and I want it to show in every page but not the home page;
> since I'm using a slider effect and a container, it became very difficult
> to me, maybe any of you can explain me a way to a easy fix, I will show you
> the lines of code:

This is probably better answered via a WordPress support venue,
but you can try this:

if ($_SERVER['PHP_SELF'] == 'the name of your index file') {
// Load alternate styling here
} else {
// Do your primary styling
}



> 
> 
> 
>
>  //Get first and last page ID
> $cnt = 0;
> foreach($pages as $page) {
> $post_keys = get_post_custom_values('section_id', $page->ID);
> $post_key[$cnt] = $post_keys[0];
> $cnt++;
> }
> ?>
>
>  $cnt = 0;
> foreach($pages as $page) {
> $post_keys = get_post_custom_values('section_id', $page->ID);
> ?>
>   id="">
> 
>  $page_content = get_page($page->ID);
> ?>
>           //This is the container with the white
> background.
> 
>  echo do_shortcode($page_content->post_content);
> ?>
> 
>
>
> As you can see, I'm using this for all pages, I was trying to use another
> template-code to tell wordpress that home page uses another page as home,
> but it does not work for some reason. Anyway, help will be appreciated.
>
> --
> Carlos Sura.-
> www.carlossura.com



-- 

Network Infrastructure Manager
http://www.php.net/

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



[PHP] PHP code problem with pages

2012-01-21 Thread Carlos Sura
Hello Mates,

Maybe my subject line is not descriptive as I wish, but I just did not know
how to put on it.

I have the following problem, I'm using jQuery to make a slide effect
(horizontal), everything seems to be working find, but I have to add a mask
with a white color background, I did this by CSS, now I have 6 pages in
total, this is managed by wp anyway, it shows the white bakground mask in
every page, and I want it to show in every page but not the home page;
since I'm using a slider effect and a container, it became very difficult
to me, maybe any of you can explain me a way to a easy fix, I will show you
the lines of code:





ID);
$post_key[$cnt] = $post_keys[0];
$cnt++;
}
?>

ID);
?>
  

ID);
?>
   //This is the container with the white
background.

post_content);
?>



As you can see, I'm using this for all pages, I was trying to use another
template-code to tell wordpress that home page uses another page as home,
but it does not work for some reason. Anyway, help will be appreciated.

-- 
Carlos Sura.-
www.carlossura.com


Re: [PHP] PHP code will not work

2008-07-10 Thread Daniel Brown
On Thu, Jul 10, 2008 at 11:07 AM, Richard Heyes <[EMAIL PROTECTED]> wrote:
>>$_ENV
>
>>$_SERVER
>
> $_ENV and $_SERVER are. Though their contents are doubtless different.

Proof that old dogs can learn new tricks.  As n00b and fundamental
as it may be, I took for granted that they weren't going to be
available.  They are different, but they certainly are available.

I'll be honest --- I just found out this minute, too, that I was
wrong about $HTTP_SERVER_VARS as well.  I ignorantly based my
assumptions (back in '97 or '98) that they'd only be available via the
web on the *name* of the array alone.  HTTP is a protocol you get
the point.

Neat-o.

-- 

Dedicated Servers - Intel 2.4GHz w/2TB bandwidth/mo. starting at just
$59.99/mo. with no contract!
Dedicated servers, VPS, and hosting from $2.50/mo.

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



Re: [PHP] PHP code will not work

2008-07-10 Thread Richard Heyes

$_ENV

>$_SERVER

$_ENV and $_SERVER are. Though their contents are doubtless different.

--
Richard Heyes

Employ me:
http://www.phpguru.org/cv

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



Re: [PHP] PHP code will not work

2008-07-10 Thread Daniel Brown
On Thu, Jul 10, 2008 at 2:15 AM, Ted Wood <[EMAIL PROTECTED]> wrote:
>
> PHP at the command line doesn't run within a web server environment.

Correct.  EGPCS is inaccessible via the CLI (unless you
force-populate the variables and arrays).  Only via a web server will
you have access to:

$_ENV
$_GET
$_POST
$_COOKIE
$_SERVER
- and -
$_SESSION

-- 

Dedicated Servers - Intel 2.4GHz w/2TB bandwidth/mo. starting at just
$59.99/mo. with no contract!
Dedicated servers, VPS, and hosting from $2.50/mo.

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



Re: [PHP] PHP code will not work

2008-07-09 Thread Ted Wood


PHP at the command line doesn't run within a web server environment.

~Ted


On 9-Jul-08, at 11:07 PM, Sanjay Mantoor wrote:


Hi,

I found
$_SERVER['HTTP_USER_AGENT'] works when you are using with browser by
server like Apache.

If you are executing your code like script in command prompt it may  
not work.

I got below :-
PHP Notice:  Undefined index: HTTP_USER_AGENT

If you use print_r($_SERVER) , you can see all the listing of indexes.



On Wed, Jul 9, 2008 at 7:15 PM, Mike V <[EMAIL PROTECTED]> wrote:


I had this problem and just figured it out.  I was copying and  
pasting the
code snippet from the tutorials page to my test editor and in the  
process

picked up an invisible ctrl char.  Doh!!


Joseph Subida wrote:



The error I get when I try



is

Parse error: syntax error, unexpected T_VARIABLE in
/Library/WebServer/Documents/test.php on line 106

I tried Googling "T_VARIABLE" and haven't found any useful  
solutions.

Any ideas? Thanks!

-J.C.

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





--
View this message in context: 
http://www.nabble.com/PHP-code-will-not-work-tp17811807p18362005.html
Sent from the PHP - General mailing list archive at Nabble.com.


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






--
Thanks,
Sanjay Mantoor

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




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



Re: [PHP] PHP code will not work

2008-07-09 Thread Sanjay Mantoor
Hi,

I found
$_SERVER['HTTP_USER_AGENT'] works when you are using with browser by
server like Apache.

If you are executing your code like script in command prompt it may not work.
I got below :-
PHP Notice:  Undefined index: HTTP_USER_AGENT

If you use print_r($_SERVER) , you can see all the listing of indexes.



On Wed, Jul 9, 2008 at 7:15 PM, Mike V <[EMAIL PROTECTED]> wrote:
>
> I had this problem and just figured it out.  I was copying and pasting the
> code snippet from the tutorials page to my test editor and in the process
> picked up an invisible ctrl char.  Doh!!
>
>
> Joseph Subida wrote:
>>
>>
>> The error I get when I try
>>
>> > echo $_SERVER['HTTP_USER_AGENT'];
>> ?>
>>
>> is
>>
>> Parse error: syntax error, unexpected T_VARIABLE in
>> /Library/WebServer/Documents/test.php on line 106
>>
>> I tried Googling "T_VARIABLE" and haven't found any useful solutions.
>> Any ideas? Thanks!
>>
>> -J.C.
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>>
>
> --
> View this message in context: 
> http://www.nabble.com/PHP-code-will-not-work-tp17811807p18362005.html
> Sent from the PHP - General mailing list archive at Nabble.com.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



-- 
Thanks,
Sanjay Mantoor

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



Re: [PHP] PHP code will not work

2008-07-09 Thread Mike V

I had this problem and just figured it out.  I was copying and pasting the
code snippet from the tutorials page to my test editor and in the process
picked up an invisible ctrl char.  Doh!!


Joseph Subida wrote:
> 
> 
> The error I get when I try
> 
>  echo $_SERVER['HTTP_USER_AGENT'];
> ?>
> 
> is
> 
> Parse error: syntax error, unexpected T_VARIABLE in 
> /Library/WebServer/Documents/test.php on line 106
> 
> I tried Googling "T_VARIABLE" and haven't found any useful solutions. 
> Any ideas? Thanks!
> 
> -J.C.
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/PHP-code-will-not-work-tp17811807p18362005.html
Sent from the PHP - General mailing list archive at Nabble.com.


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



Re: [PHP] PHP code will not work

2008-06-13 Thread Daniel Brown
On Fri, Jun 13, 2008 at 1:51 PM, PJ <[EMAIL PROTECTED]> wrote:
>
> I had a similar problem and this was suggested and it worked for me:
>
> Try to put the global $_SERVER['HTTP_USER_AGENT'] into {}brackets:
>
> echo '{$_SERVER['HTTP_USER_AGENT']}';
>
> I'm not sure about the single quotes in your situation... I'm new at this
> too :)

There actually two problems with that.

First, single-quotes force everything inside to be taken
literally, as opposed to double quotes performing translation.  This
means, with single quotes, the expression won't even be evaluated
between the brackets, but you'd get this response:

{$_SERVER['HTTP_USER_AGENT']}

  that is, if not for the second part.  Since you're using
single (literal) quotes, PHP will come back with a parse error based
on syntax, because of the $_SERVER array element name being included
in single quotes.  If you wanted to echo the actual name on purpose,
you can transpose quotes; place the literal (single) quotes on the
outside, and use translating (double) quotes within the brackets of
the $_SERVER superglobal array brackets.

-- 

Dedicated Servers - Intel 2.4GHz w/2TB bandwidth/mo. starting at just
$59.99/mo. with no contract!
Dedicated servers, VPS, and hosting from $2.50/mo.

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



Re: [PHP] PHP code will not work

2008-06-13 Thread PJ

Joseph Subida wrote:

Daniel Brown wrote:
On Wed, Jun 11, 2008 at 11:51 PM, Joseph Subida 
<[EMAIL PROTECTED]> wrote:

Hi.

I am new to PHP. I found a tutorial that said to copy and paste the 
code

into a .php document and open it in my browser:



I'm pretty sure PHP is enabled on my computer. I've tested code such 
as:


PHP is definitely on your system.

[snip!]


The error I get when I try




is

Parse error: syntax error, unexpected T_VARIABLE in
/Library/WebServer/Documents/test.php on line 106


What is the code on lines 105 and 106 of test.php?  If there's
nothing on line 105, please send us the immediately-preceding code.



105: 

All the code before line 105 is code that I've been messing around 
with.  I tried testing those three lines in its own file. But I still 
get the same error:


Parse error: syntax error, unexpected T_VARIABLE in 
/Library/WebServer/Documents/error.php on line 2




By the way, a T_VARIABLE is just a variable --- anything beginning
with a $dollar_sign.





I had a similar problem and this was suggested and it worked for me:

Try to put the global $_SERVER['HTTP_USER_AGENT'] into {}brackets:

echo '{$_SERVER['HTTP_USER_AGENT']}';

I'm not sure about the single quotes in your situation... I'm new at 
this too :)


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



Re: [PHP] PHP code will not work

2008-06-13 Thread Daniel Brown
On Fri, Jun 13, 2008 at 2:09 AM, Joseph Subida <[EMAIL PROTECTED]> wrote:
>
> 105:  106: echo $_SERVER['HTTP_USER_AGENT'];
> 107: ?>
>
> All the code before line 105 is code that I've been messing around with.  I
> tried testing those three lines in its own file. But I still get the same
> error:
>
> Parse error: syntax error, unexpected T_VARIABLE in
> /Library/WebServer/Documents/error.php on line 2

Odd if you can run a phpinfo(), see if there's anything set in
`auto_prepend_file`.

Is this a shared hosting system, or are you running it on your own
system?  Can you give us the output of your entire phpinfo() by link?

-- 

Dedicated Servers - Intel 2.4GHz w/2TB bandwidth/mo. starting at just
$59.99/mo. with no contract!
Dedicated servers, VPS, and hosting from $2.50/mo.

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



Re: [PHP] PHP code will not work

2008-06-12 Thread Joseph Subida

Daniel Brown wrote:

On Wed, Jun 11, 2008 at 11:51 PM, Joseph Subida <[EMAIL PROTECTED]> wrote:

Hi.

I am new to PHP. I found a tutorial that said to copy and paste the code
into a .php document and open it in my browser:



I'm pretty sure PHP is enabled on my computer. I've tested code such as:


PHP is definitely on your system.

[snip!]


The error I get when I try




is

Parse error: syntax error, unexpected T_VARIABLE in
/Library/WebServer/Documents/test.php on line 106


What is the code on lines 105 and 106 of test.php?  If there's
nothing on line 105, please send us the immediately-preceding code.



105: 

All the code before line 105 is code that I've been messing around with. 
 I tried testing those three lines in its own file. But I still get the 
same error:


Parse error: syntax error, unexpected T_VARIABLE in 
/Library/WebServer/Documents/error.php on line 2




By the way, a T_VARIABLE is just a variable --- anything beginning
with a $dollar_sign.



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



Re: [PHP] PHP code will not work

2008-06-12 Thread Daniel Brown
On Wed, Jun 11, 2008 at 11:51 PM, Joseph Subida <[EMAIL PROTECTED]> wrote:
> Hi.
>
> I am new to PHP. I found a tutorial that said to copy and paste the code
> into a .php document and open it in my browser:
>
>  echo $_SERVER['HTTP_USER_AGENT'];
> ?>
>
> I'm pretty sure PHP is enabled on my computer. I've tested code such as:

PHP is definitely on your system.

[snip!]

> The error I get when I try
>
>
>  echo $_SERVER['HTTP_USER_AGENT'];
> ?>
>
> is
>
> Parse error: syntax error, unexpected T_VARIABLE in
> /Library/WebServer/Documents/test.php on line 106

What is the code on lines 105 and 106 of test.php?  If there's
nothing on line 105, please send us the immediately-preceding code.

By the way, a T_VARIABLE is just a variable --- anything beginning
with a $dollar_sign.

-- 

Dedicated Servers - Intel 2.4GHz w/2TB bandwidth/mo. starting at just
$59.99/mo. with no contract!
Dedicated servers, VPS, and hosting from $2.50/mo.

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



Re: [PHP] PHP code will not work

2008-06-12 Thread Nathan Nobbe
On Wed, Jun 11, 2008 at 9:51 PM, Joseph Subida <[EMAIL PROTECTED]> wrote:

> Hi.
>
> I am new to PHP. I found a tutorial that said to copy and paste the code
> into a .php document and open it in my browser:
>
>  echo $_SERVER['HTTP_USER_AGENT'];
> ?>
>
> I'm pretty sure PHP is enabled on my computer. I've tested code such as:
>
>  //Function arguments
> function writeMyName2($fname)
>  {
>  echo $fname . " Refsnes.";
>  }
> echo "My name is ";
> writeMyName2("Kai Jim");
> echo "My name is ";
> writeMyName2("Hege");
> echo "My name is ";
> writeMyName2("Stale");
> ?>
>
> which works fine.
>
> The error I get when I try
>
>
>  echo $_SERVER['HTTP_USER_AGENT'];
> ?>
>
> is
>
> Parse error: syntax error, unexpected T_VARIABLE in
> /Library/WebServer/Documents/test.php on line 106
>
> I tried Googling "T_VARIABLE" and haven't found any useful solutions. Any
> ideas? Thanks!


im guessing



isnt the complete file thats giving you troubles, because theres only one
line in it.  whichever file is giving you troubles has a syntax error on
line 106.

-nathan


[PHP] PHP code will not work

2008-06-12 Thread Joseph Subida

Hi.

I am new to PHP. I found a tutorial that said to copy and paste the code 
into a .php document and open it in my browser:




I'm pretty sure PHP is enabled on my computer. I've tested code such as:

";
  }
echo "My name is ";
writeMyName2("Kai Jim");
echo "My name is ";
writeMyName2("Hege");
echo "My name is ";
writeMyName2("Stale");
?>

which works fine.

The error I get when I try




is

Parse error: syntax error, unexpected T_VARIABLE in 
/Library/WebServer/Documents/test.php on line 106


I tried Googling "T_VARIABLE" and haven't found any useful solutions. 
Any ideas? Thanks!


-J.C.

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



Re: [PHP] PHP Code I Must find

2008-05-30 Thread Thijs Lensselink

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.







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 
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



/To report a technical problem with this
site  please href="mailto:webmaste&#

11
4;@grandlodg&
#1 01;.mb.ca">contact  the
webmaster./

/In UTF code:

mailto:webmaster&#
06
4;grandlodge&
#0 46;mb.ca

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]');



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



Re: [PHP] PHP Code I Must find

2008-05-29 Thread John Taylor-Johnston

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.
  





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 
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

  
  

/To report a technical problem with this
site  please href="mailto:webmaste&#

11
4;@grandlodg&
#1 01;.mb.ca">contact  the
webmaster./

/In UTF code:

mailto:webmaster&#
06
4;grandlodge&
#0 46;mb.ca

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 --


  


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



Re: [PHP] PHP Code I Must find

2008-05-29 Thread John Taylor-Johnston

Ok.





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 
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

  
/To report a technical problem with this site 
please href="mailto:webmaste

4;@grandlodg
01;.mb.ca">contact  the
webmaster./

/In UTF code:

mailto:webmaster
4;grandlodge�
46;mb.ca

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 --


  


Re: [PHP] PHP Code I Must find

2008-05-29 Thread TG

You could look at the email cloaking routine that Joomla uses.

Here's a starting point:
http://dev.joomla.org/component/option,com_jd-wiki/Itemid,/id,references:joomla.framework:html:jhtmlemail-cloak/

-TG

- Original Message -
From: John Taylor-Johnston <[EMAIL PROTECTED]>
To: PHP-General 
Date: Thu, 29 May 2008 19:08:34 -0400
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
> >
> >> /To report a technical problem with this site 
> >> please  >> 

href="mailto:webmaster@grandlodge.mb.ca";>contact
 
> >> the webmaster./
> >>
> >> /In UTF code:
> >>
> >> 

mailto:webmaster@grandlodge.mb.ca;
> >>
> >> 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



Re: [PHP] PHP Code I Must find

2008-05-29 Thread Jeremy Privett

John Taylor-Johnston wrote:
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

/To report a technical problem with this site 
please href="mailto:webmaster@grandlodge.mb.ca";>contact 
the webmaster./


/In UTF code:

mailto:webmaster@grandlodge.mb.ca; 



would be this in latin characters:

mailto:[EMAIL PROTECTED]/



http://www.asciitable.com/
http://www.php.net/ord

The rest should be easy to figure out on your own.

--
Jeremy Privett
C.E.O. & C.S.A.
Omega Vortex Corporation

http://www.omegavortex.net

Please note: This message has been sent with information that could be 
confidential and meant only for the intended recipient. If you are not the 
intended recipient, please delete all copies and inform us of the error as soon 
as possible. Thank you for your cooperation.


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



[PHP] PHP Code I Must find

2008-05-29 Thread John Taylor-Johnston

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

/To report a technical problem with this site 
please href="mailto:webmaster@grandlodge.mb.ca";>contact 
the webmaster./


/In UTF code:

mailto:webmaster@grandlodge.mb.ca;

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



Re: [PHP] PHP code to write excel spreadsheet with multiple workbooks

2008-03-28 Thread Wolf

 Mary Anderson <[EMAIL PROTECTED]> wrote: 
> Hi all,
> I have a linux based web app which prints an html screen of results. 
>   My users really want Excel spreadsheets with the same results.  There 
> is a PEAR application which does this,  but from the PEAR description it 
> seems to be pretty buggy (65 open bugs, average days open 616 days) and 
> dated.
> 
> My spreadsheets will be somewhat simple.  They will have multiple 
> workbooks and could be as large as 1 rows spread out over 100 
> workbooks (Bigger than the code can handle, according to one of the open 
> bug reports).  No colors, no formulas, no hyperlinks.
> 
>I've checked the archives and found an example which shows me how to 
> write the results of an SQL (MySQL, I am using postresql, but the 
> example will still work) into a very simple Excel spreadsheet with just 
> one table of results.  Is there a way to get a php program to generate a 
> spreadsheet with multiple workbooks?
> 
> Thanks
> 
> Mary

You can write them via XML, but there are also come classes out there that 
people have written for doing excel stuff as well.

http://www.phpclasses.org used to be a good place to go and see what classes 
there are.

HTH,
Wolf

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



Re: [PHP] PHP code to write excel spreadsheet with multiple workbooks

2008-03-28 Thread Andrew Ballard
On Fri, Mar 28, 2008 at 1:12 PM, Mary Anderson
<[EMAIL PROTECTED]> wrote:
> Hi all,
> I have a linux based web app which prints an html screen of results.
>   My users really want Excel spreadsheets with the same results.  There
>  is a PEAR application which does this,  but from the PEAR description it
>  seems to be pretty buggy (65 open bugs, average days open 616 days) and
>  dated.
>
> My spreadsheets will be somewhat simple.  They will have multiple
>  workbooks and could be as large as 1 rows spread out over 100
>  workbooks (Bigger than the code can handle, according to one of the open
>  bug reports).  No colors, no formulas, no hyperlinks.
>
>I've checked the archives and found an example which shows me how to
>  write the results of an SQL (MySQL, I am using postresql, but the
>  example will still work) into a very simple Excel spreadsheet with just
>  one table of results.  Is there a way to get a php program to generate a
>  spreadsheet with multiple workbooks?
>

There is an XML format that Microsoft has documented that will do
multi-workbook spreadsheets in Excel. (You can get an idea by saving
an existing spreadsheet as XML and looking at the source.) I haven't
used any libraries like PEAR to build them, but it isn't too difficult
to write with the basic PHP XML libraries like XMLWriter or DOM.

Andrew

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



[PHP] PHP code to write excel spreadsheet with multiple workbooks

2008-03-28 Thread Mary Anderson

Hi all,
   I have a linux based web app which prints an html screen of results. 
 My users really want Excel spreadsheets with the same results.  There 
is a PEAR application which does this,  but from the PEAR description it 
seems to be pretty buggy (65 open bugs, average days open 616 days) and 
dated.


   My spreadsheets will be somewhat simple.  They will have multiple 
workbooks and could be as large as 1 rows spread out over 100 
workbooks (Bigger than the code can handle, according to one of the open 
bug reports).  No colors, no formulas, no hyperlinks.


  I've checked the archives and found an example which shows me how to 
write the results of an SQL (MySQL, I am using postresql, but the 
example will still work) into a very simple Excel spreadsheet with just 
one table of results.  Is there a way to get a php program to generate a 
spreadsheet with multiple workbooks?


Thanks

Mary

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



Re: [PHP] php code compiles, produces good html output, but crashes when put through browser

2007-12-16 Thread Per Jessen
Casey wrote:

> Maybe I didn't read well enough, but if the PHP produces proper HTML
> on the command line, shouldn't it work in the browser too? 

Not necessarily.  Running stand-alone and in the webserver are two
completely different environments. 

> My logic is that if the title displays, then the browser hangs, it
> should be something on the client-side, right?

It _could_ be, but I doubt it.  The browser/client might be "hanging"
waiting for the server to finish. 


/Per Jessen, Zürich

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



Re: [PHP] php code compiles, produces good html output, but crashes when put through browser

2007-12-16 Thread Jochem Maas
Casey wrote:
> On Dec 15, 2007 11:27 PM, Jochem Maas <[EMAIL PROTECTED]> wrote:
>> Casey wrote:
>>> Comment out all Javascript.
>> Casey - exactly how would javascript being causing a webserver to segfault
>> in this context???
>>
>>
>>> On Dec 15, 2007, at 2:00 PM, "Daniel Brown" <[EMAIL PROTECTED]> wrote:
>>>
 On Dec 15, 2007 4:55 PM, Mary Anderson <[EMAIL PROTECTED]>
 wrote:
> My code
>
> http://demog.berkeley.edu/~maryfran/memdev/get_data_set.php
>
Mary,

Can you provide the actual code for the page?  None of us can
 really help you out too much without seeing more than a blank page.


 --
 Daniel P. Brown
 [Phone Numbers Go Here!]
 [They're Hidden From View!]

 If at first you don't succeed, stick to what you know best so that you
 can make enough money to pay someone else to do it for you.

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

>>
> 
> Maybe I didn't read well enough, but if the PHP produces proper HTML
> on the command line, shouldn't it work in the browser too? My logic is
> that if the title displays, then the browser hangs, it should be
> something on the client-side, right?

if the client-side (browser) recieves no data then it can't display anything,
besides I'm sure Mary is savvy enough to know that a javascript problem is
something not for this list ... besides which she said that the output of
her script when from the command line can be saved and viewed in a browser 
without
problem.

> 
> Maybe I'm not thinking clearly. I worked all day today..
> -Casey
> 

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



Re: [PHP] php code compiles, produces good html output, but crashes when put through browser

2007-12-15 Thread Casey
On Dec 15, 2007 11:27 PM, Jochem Maas <[EMAIL PROTECTED]> wrote:
> Casey wrote:
> > Comment out all Javascript.
>
> Casey - exactly how would javascript being causing a webserver to segfault
> in this context???
>
>
> >
> > On Dec 15, 2007, at 2:00 PM, "Daniel Brown" <[EMAIL PROTECTED]> wrote:
> >
> >> On Dec 15, 2007 4:55 PM, Mary Anderson <[EMAIL PROTECTED]>
> >> wrote:
> >>>
> >>> My code
> >>>
> >>> http://demog.berkeley.edu/~maryfran/memdev/get_data_set.php
> >>>
> >>
> >>Mary,
> >>
> >>Can you provide the actual code for the page?  None of us can
> >> really help you out too much without seeing more than a blank page.
> >>
> >>
> >> --
> >> Daniel P. Brown
> >> [Phone Numbers Go Here!]
> >> [They're Hidden From View!]
> >>
> >> If at first you don't succeed, stick to what you know best so that you
> >> can make enough money to pay someone else to do it for you.
> >>
> >> --
> >> PHP General Mailing List (http://www.php.net/)
> >> To unsubscribe, visit: http://www.php.net/unsub.php
> >>
> >
>
>

Maybe I didn't read well enough, but if the PHP produces proper HTML
on the command line, shouldn't it work in the browser too? My logic is
that if the title displays, then the browser hangs, it should be
something on the client-side, right?

Maybe I'm not thinking clearly. I worked all day today..
-Casey

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



Re: [PHP] php code compiles, produces good html output, but crashes when put through browser

2007-12-15 Thread Jochem Maas
Casey wrote:
> Comment out all Javascript.

Casey - exactly how would javascript being causing a webserver to segfault
in this context???

> 
> On Dec 15, 2007, at 2:00 PM, "Daniel Brown" <[EMAIL PROTECTED]> wrote:
> 
>> On Dec 15, 2007 4:55 PM, Mary Anderson <[EMAIL PROTECTED]>
>> wrote:
>>>
>>> My code
>>>
>>> http://demog.berkeley.edu/~maryfran/memdev/get_data_set.php
>>>
>>
>>Mary,
>>
>>Can you provide the actual code for the page?  None of us can
>> really help you out too much without seeing more than a blank page.
>>
>>
>> -- 
>> Daniel P. Brown
>> [Phone Numbers Go Here!]
>> [They're Hidden From View!]
>>
>> If at first you don't succeed, stick to what you know best so that you
>> can make enough money to pay someone else to do it for you.
>>
>> -- 
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
> 

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



Re: [PHP] php code compiles, produces good html output, but crashes when put through browser

2007-12-15 Thread Casey

Comment out all Javascript.



On Dec 15, 2007, at 2:00 PM, "Daniel Brown" <[EMAIL PROTECTED]> wrote:

On Dec 15, 2007 4:55 PM, Mary Anderson <[EMAIL PROTECTED]>  
wrote:


My code

http://demog.berkeley.edu/~maryfran/memdev/get_data_set.php



   Mary,

   Can you provide the actual code for the page?  None of us can
really help you out too much without seeing more than a blank page.


--
Daniel P. Brown
[Phone Numbers Go Here!]
[They're Hidden From View!]

If at first you don't succeed, stick to what you know best so that you
can make enough money to pay someone else to do it for you.

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



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



Re: [PHP] php code compiles, produces good html output, but crashes when put through browser

2007-12-15 Thread Daniel Brown
On Dec 15, 2007 4:55 PM, Mary Anderson <[EMAIL PROTECTED]> wrote:
>
> My code
>
> http://demog.berkeley.edu/~maryfran/memdev/get_data_set.php
>

Mary,

Can you provide the actual code for the page?  None of us can
really help you out too much without seeing more than a blank page.


-- 
Daniel P. Brown
[Phone Numbers Go Here!]
[They're Hidden From View!]

If at first you don't succeed, stick to what you know best so that you
can make enough money to pay someone else to do it for you.

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



[PHP] php code compiles, produces good html output, but crashes when put through browser

2007-12-15 Thread Mary Anderson

Hi,
  Need some help with debugging procedures.

  This is a postgresql/PHP running with PHP 5. I have used both IE7 and 
mozilla 5.0 with this file.  The postgres part works fine,  and the html 
that is generated is OK, but the .php file hangs when I run it through 
the browser.


  I have two tables -- data_series and data_sets with a 1-many relation 
between the data_series and data_sets.  My page first displays  the 
data_series in a .  Then it pulls the data_sets belonging to 
user selected data_series and displays them in a select.  There are 
links to .php files to process the selected data_set.




My code

http://demog.berkeley.edu/~maryfran/memdev/get_data_set.php

compiles OK when I run php on it from the shell.  It produces  html 
forms which will load into the browser and run as expected.  However 
when I try to run the .php file in the browser it parses the head, 
displays the title, and then hangs. No error messages are displayed, 
even though I have called error_reporting(E_ALL) at the very top of the 
.php file.  I had an echo statement on each line of php code.  None were 
printed out.  I checked permissions on the .php file.  Changing them did 
not improve the situation.


 I need some basic debugging tools that I don't have to figure out what 
is going on. Alas,  I think this code would hang before it got to the 
debugger! Any advice is appreciated.  At this point I am clueless.


Mary Anderson

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



Re: [PHP] Php code in html buttons

2007-07-11 Thread Richard Lynch
On Tue, July 10, 2007 5:59 pm, k w wrote:
> I'm trying to make a button execute some php code when the button is
> clicked. I'm not sure if it is the button i'm coding wrong or the php
> code.
> Here is the code I am using.
>
>  echo "";
> ?>

Actually, since I've answered this one the same way quite a few times,
I decided to just put it in my blog:
http://richardlynch.blogspot.com/2007/07/php-in-html.html

Now if I can just remember to use that link the next time instead of
typing it all again...

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] Php code in html buttons

2007-07-11 Thread Richard Lynch
On Tue, July 10, 2007 5:59 pm, k w wrote:
> I'm trying to make a button execute some php code when the button is
> clicked. I'm not sure if it is the button i'm coding wrong or the php
> code.
> Here is the code I am using.
>
>  echo "";
> ?>

[sportscaster voice-over]

Joe: Hey Bob, let's look at a slow-motion instant-replay of this
common PHP newbie fallacy scenario
Bob: Sure Joe!
Joe: Okay, so here goes:
  The user requests a HTTP URL document.
  The webserver fires up.
  The webserver finds that it needs PHP to generate the document.
  PHP fires up.
Bob: Wow, look at it go!  That's fast!
Joe: Yeah, it is fast.
  PHP has generated the document, and spits it out.
Bob: Boy, it's already finished.  Hey, it's quit!
Joe: That's right, Bob.
  PHP has FINISHED EXECUTION, and has exited.
  Now watch this!
Bob: Oh boy, I see it coming now...
Joe: Yep, there it is.
  There's some HTML in the browser, trying to execute some PHP code...
Bob: But you can see, PHP has LONG FINISHED and is OUTTA HERE!!!
Joe: That's right, Bob, PHP is simply not around to execute that code.
Bob: So what can you do, Joe?
Joe: Well, if you can live with the browser going back-n-forth to the
web-server, with a significant "lag" time...
Bob: Oooh, well, I can see how that might be useful sometimes...
Joe: In those cases, you can use Ajax.
Bob: Anything else?
Joe: Not really.  Until you get back to the webserver and PHP, there's
just no PHP available.  Unless your user is in the extreme minority of
uber-PHP-geeks that has installed this EXPERIMENTAL PHP browser
plug-in thingie: http://pecl.php.net/package/PHPScript
Bob: Whoa, Joe, I don't think I've ever even heard of anybody who's
ever installed that.
Joe: Me neither, though I met Wez Furlong who wrote it, so I have to
assume HE has installed it at least once...

[cue to cool Guinness commercial]

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] Php code in html buttons

2007-07-11 Thread Sancar Saran
Hello,

What about this.

test.php



"
}
else
{
$strReturn =
"do whatever want to with your mysql result";
}
echo $strReturn;
?>

Hope helps.

To ajaxing this page please look
www.xajaxproject.org

Regards

On Wednesday 11 July 2007 01:59:42 k w wrote:
> I'm trying to make a button execute some php code when the button is
> clicked. I'm not sure if it is the button i'm coding wrong or the php code.
> Here is the code I am using.
>
>  echo ""; ?>
>
> I've got all my variables stored in the php page, and I know they are all
> correct. But when I push the button it does nothing. I'm not quite sure
> what I am doing wrong.
>
> I have also tried
>
> 
>
> and
>
> 
> 
> 
>
> Obviously i'm a complete newbie. I'd appreciate any help. Thanks.

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



Re: [PHP] Php code in html buttons

2007-07-10 Thread jekillen


On Jul 10, 2007, at 3:59 PM, k w wrote:


I'm trying to make a button execute some php code when the button is
clicked. I'm not sure if it is the button i'm coding wrong or the php 
code.

Here is the code I am using.

echo "";

?>

I've got all my variables stored in the php page, and I know they are 
all
correct. But when I push the button it does nothing. I'm not quite 
sure what

I am doing wrong.

I have also tried



and





Obviously i'm a complete newbie. I'd appreciate any help. Thanks.


You will have to use a form and set the action to the page that runs 
the code, It can be the same page.
In which case the action in the form open tag will be the name of the 
present file.
You have to have code in the top of the page to catch a $_POST or $_GET 
variable.

 The button will look something like this:

  NAME HERE IS IMPORTANT
onclick='document.forms,form1.submit(form)'> THIS IS WHY THE FORM NAME 
ASSIGNMENT IS IMPORTANT





In the top of the page you can do:
$some_variable = '';
if($_POST[hidden field name] or $_GET[hidden field name])
  {
   // run your code here
  // assign the result to $some_variable
  // assign extra hidden field values to variables that should persist 
across page loads

}

Then in the page in the location you want it:


there is one catch, if you have variable values in the page before you 
click the button and you want them to be there when the page reloads,
or another page sends the result, these variable values will also have 
to be loaded into hidden fields, sent to the server and re entered in 
the

returned data.
You can add hidden fields like so:


This will work with single or double quotes around the php code block
Each of these extra form fields will have to be inside the same form 
tag set that the button is in.

JK

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



Re: [PHP] Php code in html buttons

2007-07-10 Thread Richard Davey
Hi k,

Tuesday, July 10, 2007, 11:59:42 PM, you wrote:

> I'm trying to make a button execute some php code when the button is
> clicked. I'm not sure if it is the button i'm coding wrong or the php code.
> Here is the code I am using.

>  echo "";
?>>

Everything about this approach is wrong.

PHP is a *server side* language, not client-side.

An onclick is a client-side event. The PHP cannot be re-parsed and
acted upon when you hit onclick in the way you are trying to do.

You can either make the page reload (or go to another page) which runs
the results of the button click, or you can perform some Ajax wizardry
in the onclick event to call a remote PHP script and suck the results
back into your current page.

To be honest I'd start by reading any of the stacks of online
PHP beginners tutorials out there before touching another line of code
on this path.

Cheers,

Rich
-- 
Zend Certified Engineer
http://www.corephp.co.uk

"Never trust a computer you can't throw out of a window"

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



[PHP] Php code in html buttons

2007-07-10 Thread k w

I'm trying to make a button execute some php code when the button is
clicked. I'm not sure if it is the button i'm coding wrong or the php code.
Here is the code I am using.

'Click";
?>

I've got all my variables stored in the php page, and I know they are all
correct. But when I push the button it does nothing. I'm not quite sure what
I am doing wrong.

I have also tried



and





Obviously i'm a complete newbie. I'd appreciate any help. Thanks.


[PHP] PHP code only works on 1 server

2007-03-19 Thread PHP
Dear All,
I wrote a simple PHP 404 handler (index.php)(see the code below) to catch
missing pages for instance. But it only works on 1 server and not the other.

This is the server where it works:
My Server:
http://www.orbitalnets.com/support/info.php

This is the server where it won't work (which is the server where it should
work):
Setarnet:
http://www.kabga.aw/info.php

Could it be the version difference? How should it be coded to work on all
php servers?



Here is the code of the index.php file.

http://www.kabga.aw/nl/index.php\";> ";
 $errormsg .= "";
 $errormsg .= "404 File not foundmailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]";
 $errormsg .= " Tel: +297 582-4455Fax: +297 582-2018";
 $navsignthing = "$page";
 $extension = "php";

if(file_exists("$navsignthing.$extension"))
{
include "$navsignthing.$extension";
}
elseif($navsignthing=="")
{
include "default.$extension";
}
else
{
echo "$errormsg";
}
?>


Please let me know,

Dwayne Heronimo

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



Re: [PHP] php code to upload a url correctly

2007-01-29 Thread Richard Lynch
On Fri, January 26, 2007 8:10 am, Corden James (RW3) CM&MC Manchester
wrote:
> I have a form in which users submit a url. I am having problems as
> some
> people submit the url in the format http://www.blah.blah.org
>   while others submit in the format
> www.blah.blah.org   I have designed the
> form
> so that it seems fairly obvious (to me anyway) not to include the
> http:// but people are still doing it (presumably because they are
> copying and pasting from a browser). My form processing script is
> designed to add http:// to the submitted url and place the modified
> url
> in a database for future use. As you can imagine sometimes I end up
> with
> urls such as http://http://www.blah.blah.org
>   in my database. Hence I need a more
> rigorous form processing script that is capable of first checking if
> the
> url includes http:// and then processes accordingly. Can anyone point
> me
> in the right direction for such a script?

Perhaps you could do this:
if (strtolower(substr($input, 0, 7)) === 'http://') $input =
substr($input, 7);

What I tend to do, however, is just check on output:
if (!stristr($link, 'http://')) $link = "http://$link";;

Yes, this means that I may be re-doing the operation a zillion times
at output instead of once at input, but it also means that users
aren't miffed that I took their URL and "changed" it out from under
them when they go back to edit it.

There is also the nifty http://php.net/parse_url which might be smart
enough to default to 'http://' and then you could assemble the URL.

Depends how funky the URLs might get -- Mine are always just
homepages, so don't have much in the way of weird complex URL issues
like #fragment or GET parameters.

One other suggestion:

You could use http://php.net/fopen to find out if the link is valid at
the time of input.

This will slow down input considerably, but can help catch typos in URLs.

You could even go so far as to "read" the beginning of the HTML and
see if there is a TITLE tag, and present that to the user to confirm
it's the page they meant...

Though there's an awful lot of bad HTML out there with no title tag.
:-( So then you need an extra check for that, and a fallback like the
first non-tag line of the body or the META description if it's there
or...

This presumes allow_url_fopen is "on" in php.ini, which might not be
true for security reasons.


-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] php code to upload a url correctly

2007-01-26 Thread Jochem Maas
Dave Goodchild wrote:
> Wouldn't it have been less hassle to not send that comment when all I
> was doing was trying to help, am pressed for time, and copied and pasted
> my solution?

no hassle on my part. :-D

I doubt you want me to point out that you original
comment that I commented on and the reply thereof
you sent both constitute a greater waste of your time
(and less confusion on the part of the OP) than if you had
just removed the 'raw_param' from your original code snippet),
given that your so 'pressed for time' (which is, in essence, nothing more
than a state of mind).

"do or do not, there is no try" said the funnny, little green man.

> 
> On 1/26/07, * Jochem Maas* <[EMAIL PROTECTED]
> > wrote:
> 
> Dave Goodchild wrote:
> > This is what I use:
> >
> > $site = (!preg_match('#^http://#', $_POST['c_site'])) ?
> > raw_param(trim(strip_tags("http:\/\/" . $_POST['c_site']))) :
> > raw_param(trim(strip_tags($_POST['c_site'])));
> 
> this is much better: http://php.net/parse_url
> 
> >
> > don't worry about raw_param, that's a function of my own, but you
> get the
> > idea.
> 
> wouldn't it have been less hassle to delete the raw_param() call than
> to try and explain it's existence?
> 
> >
> 
> 
> 
> 
> -- 
> http://www.web-buddha.co.uk

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



Re: [PHP] php code to upload a url correctly

2007-01-26 Thread Jochem Maas
Stut wrote:
> Jochem Maas wrote:
>> Németh Zoltán wrote:
>

...

> 
> I don't have numbers, but I'd bet this is quicker than doing a parse_url.

I didn't realise speed was an issue. and if it really was an issue I would 
suggest
offloading the url normailization into a batch routine that is run outside of 
any
web request - i.e. merely take the input store it somewhere as-is for later
normalization and insertion into the DB. (most likely total overkill)

personally I think robustness & correctness are more important than speed.

> 
> -Stut
> 

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



Re: [PHP] php code to upload a url correctly

2007-01-26 Thread Stut

Jochem Maas wrote:

Németh Zoltán wrote:

You should first check the url and only add "http://"; at the beginning
if its not there

I do it like

if (substr($url, 0, 4) != "http") {$url = "http://"; . $url;}

in my website, although it is probably not the most elegant solution ;)


it will break in the highly unlikely situation that someone uploads a url like:

http.mydomain.com

an also for things like:

ftp://leet.haxordownload.org/

2 alternatives spring to mind:

1. a beasty little regex.
2. use the output of parse_url().

the second is by far the better way of doing this


Using parse_url for this seems like overkill to me. Just check the 
string for the presence of :// and prepend http:// if it's missing.


if (false === strpos($url, '://'))
{
$url = 'http://'.$url;
}

There will be fringe cases where someone might enter 
example.com/jumpto?url=http://othersite.org/, in which case do the check 
up to the first '.'.


if (false === strpos(substr($url, 0, strpos($url, '.'), '://'))
{
$url = 'http://'.$url;
}

I don't have numbers, but I'd bet this is quicker than doing a parse_url.

-Stut

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



Re: [PHP] php code to upload a url correctly

2007-01-26 Thread Németh Zoltán
On p, 2007-01-26 at 16:46 +0100, Jochem Maas wrote:
> Németh Zoltán wrote:
> > On p, 2007-01-26 at 14:10 +, Corden James (RW3) CM&MC Manchester
> > wrote:
> >> I have a form in which users submit a url. I am having problems as some
> >> people submit the url in the format http://www.blah.blah.org
> >>   while others submit in the format
> >> www.blah.blah.org   I have designed the form
> >> so that it seems fairly obvious (to me anyway) not to include the
> >> http:// but people are still doing it (presumably because they are
> >> copying and pasting from a browser). My form processing script is
> >> designed to add http:// to the submitted url and place the modified url
> >> in a database for future use. As you can imagine sometimes I end up with
> >> urls such as http://http://www.blah.blah.org
> >>   in my database. Hence I need a more
> >> rigorous form processing script that is capable of first checking if the
> >> url includes http:// and then processes accordingly. Can anyone point me
> >> in the right direction for such a script?
> >>
> >>  
> >>
> > 
> > You should first check the url and only add "http://"; at the beginning
> > if its not there
> > 
> > I do it like
> > 
> > if (substr($url, 0, 4) != "http") {$url = "http://"; . $url;}
> > 
> > in my website, although it is probably not the most elegant solution ;)
> 
> it will break in the highly unlikely situation that someone uploads a url 
> like:
> 
>   http.mydomain.com
> 
> an also for things like:
> 
>   ftp://leet.haxordownload.org/
> 
> 2 alternatives spring to mind:
> 
>   1. a beasty little regex.
>   2. use the output of parse_url().

parse_url is a great idea, I think I will use that in the future

thanks Jochem

greets
Zoltán Németh

> 
> the second is by far the better way of doing this, below a couple of
> examples:
> 
>  
> var_dump(
>   parse_url("http.mydomain.com/foo.php?id=1"),
>   parse_url("https://www.foo.org/html.html?arg=a";),
>   parse_url("ftp://leet.haxordl.org";)
> );
> 
> ?>
> 
> hopefully the OP has enough brains (I'll assume he does given the 'Dr' title 
> he carries :-)
> to figure out how to use the output to be able to always generate a valid url 
> from whatever
> people are sticking in his form (and/or return a suitable error if someone 
> tries to insert
> some complete rubbish)

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



Re: [PHP] php code to upload a url correctly

2007-01-26 Thread Jochem Maas
Dave Goodchild wrote:
> This is what I use:
> 
> $site = (!preg_match('#^http://#', $_POST['c_site'])) ?
> raw_param(trim(strip_tags("http:\/\/" . $_POST['c_site']))) :
> raw_param(trim(strip_tags($_POST['c_site'])));

this is much better: http://php.net/parse_url

> 
> don't worry about raw_param, that's a function of my own, but you get the
> idea.

wouldn't it have been less hassle to delete the raw_param() call than
to try and explain it's existence?

> 

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



Re: [PHP] php code to upload a url correctly

2007-01-26 Thread Jochem Maas
Németh Zoltán wrote:
> On p, 2007-01-26 at 14:10 +, Corden James (RW3) CM&MC Manchester
> wrote:
>> I have a form in which users submit a url. I am having problems as some
>> people submit the url in the format http://www.blah.blah.org
>>   while others submit in the format
>> www.blah.blah.org   I have designed the form
>> so that it seems fairly obvious (to me anyway) not to include the
>> http:// but people are still doing it (presumably because they are
>> copying and pasting from a browser). My form processing script is
>> designed to add http:// to the submitted url and place the modified url
>> in a database for future use. As you can imagine sometimes I end up with
>> urls such as http://http://www.blah.blah.org
>>   in my database. Hence I need a more
>> rigorous form processing script that is capable of first checking if the
>> url includes http:// and then processes accordingly. Can anyone point me
>> in the right direction for such a script?
>>
>>  
>>
> 
> You should first check the url and only add "http://"; at the beginning
> if its not there
> 
> I do it like
> 
> if (substr($url, 0, 4) != "http") {$url = "http://"; . $url;}
> 
> in my website, although it is probably not the most elegant solution ;)

it will break in the highly unlikely situation that someone uploads a url like:

http.mydomain.com

an also for things like:

ftp://leet.haxordownload.org/

2 alternatives spring to mind:

1. a beasty little regex.
2. use the output of parse_url().

the second is by far the better way of doing this, below a couple of
examples:

https://www.foo.org/html.html?arg=a";),
parse_url("ftp://leet.haxordl.org";)
);

?>

hopefully the OP has enough brains (I'll assume he does given the 'Dr' title he 
carries :-)
to figure out how to use the output to be able to always generate a valid url 
from whatever
people are sticking in his form (and/or return a suitable error if someone 
tries to insert
some complete rubbish)

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



Re: [PHP] php code to upload a url correctly

2007-01-26 Thread Dave Goodchild

This is what I use:

$site = (!preg_match('#^http://#', $_POST['c_site'])) ?
raw_param(trim(strip_tags("http:\/\/" . $_POST['c_site']))) :
raw_param(trim(strip_tags($_POST['c_site'])));

don't worry about raw_param, that's a function of my own, but you get the
idea.


Re: [PHP] php code to upload a url correctly

2007-01-26 Thread Németh Zoltán
On p, 2007-01-26 at 14:10 +, Corden James (RW3) CM&MC Manchester
wrote:
> I have a form in which users submit a url. I am having problems as some
> people submit the url in the format http://www.blah.blah.org
>   while others submit in the format
> www.blah.blah.org   I have designed the form
> so that it seems fairly obvious (to me anyway) not to include the
> http:// but people are still doing it (presumably because they are
> copying and pasting from a browser). My form processing script is
> designed to add http:// to the submitted url and place the modified url
> in a database for future use. As you can imagine sometimes I end up with
> urls such as http://http://www.blah.blah.org
>   in my database. Hence I need a more
> rigorous form processing script that is capable of first checking if the
> url includes http:// and then processes accordingly. Can anyone point me
> in the right direction for such a script?
> 
>  
> 

You should first check the url and only add "http://"; at the beginning
if its not there

I do it like

if (substr($url, 0, 4) != "http") {$url = "http://"; . $url;}

in my website, although it is probably not the most elegant solution ;)

hope that helps
Zoltán Németh

> Thanks
> 
>  
> 
> Dr James Corden
> 
> Technology Evaluation Manager
> 
> TrusTECH, Innovation Unit
> 
> 1st Floor Postgraduate Centre
> 
> Manchester Royal Infirmary
> 
> Oxford Road
> 
> Manchester 
> 
> M13 9WL
> 
>  
> 
> Tel:   0161 276 5782
> 
> Fax:  0161 276 5766
> 
> E-mail: [EMAIL PROTECTED]
> 
> Web: http://www.trustech.org.uk
> 
> This email and any files transmitted with it are confidential and solely
> for the use of the intended recipient. It may contain material protected
> by law as a legally privileged document and copyright work. Its content
> should not be disclosed and it should not be given or copied to anyone
> other than the person(s) named or referenced above. If you are not the
> intended recipient or the person responsible for delivering to the
> intended recipient, be advised that you have received this email in
> error and that any use is strictly prohibited. 
> 
> If you have received this email in error please notify sender
> immediately on +44 (0161) 276 5782
> 
>  
> 

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



[PHP] php code to upload a url correctly

2007-01-26 Thread Corden James (RW3) CM&MC Manchester
I have a form in which users submit a url. I am having problems as some
people submit the url in the format http://www.blah.blah.org
  while others submit in the format
www.blah.blah.org   I have designed the form
so that it seems fairly obvious (to me anyway) not to include the
http:// but people are still doing it (presumably because they are
copying and pasting from a browser). My form processing script is
designed to add http:// to the submitted url and place the modified url
in a database for future use. As you can imagine sometimes I end up with
urls such as http://http://www.blah.blah.org
  in my database. Hence I need a more
rigorous form processing script that is capable of first checking if the
url includes http:// and then processes accordingly. Can anyone point me
in the right direction for such a script?

 

Thanks

 

Dr James Corden

Technology Evaluation Manager

TrusTECH, Innovation Unit

1st Floor Postgraduate Centre

Manchester Royal Infirmary

Oxford Road

Manchester 

M13 9WL

 

Tel:   0161 276 5782

Fax:  0161 276 5766

E-mail: [EMAIL PROTECTED]

Web: http://www.trustech.org.uk

This email and any files transmitted with it are confidential and solely
for the use of the intended recipient. It may contain material protected
by law as a legally privileged document and copyright work. Its content
should not be disclosed and it should not be given or copied to anyone
other than the person(s) named or referenced above. If you are not the
intended recipient or the person responsible for delivering to the
intended recipient, be advised that you have received this email in
error and that any use is strictly prohibited. 

If you have received this email in error please notify sender
immediately on +44 (0161) 276 5782

 



[PHP] PHP code not functioning on search page

2006-03-13 Thread Bruce Gilbert
I have a bit of PHP rotating image code and time stamp that work fine
on every page except my search page
http://inspired-evolution.com/search.php. I installed a PHP based
search engine called Zoom Search as a plug-in in Dreamweaver. Since
the code works on every other page, I am not sure why it wouldn't on
this page. An example of a page where the code works fine is
http://inspired-evolution.com/search_template.php

Any assistance?

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



Re: [PHP] PHP code in a MySQL record

2005-07-29 Thread André Medeiros
Either what Kris says, or you can use a templating engine.

See Smarty (http://smarty.php.net)

On 7/29/05, Kristen G. Thorson <[EMAIL PROTECTED]> wrote:
> Is there a particular reason you need *PHP* in the database?  If not,
> then use a placeholder system of some sort ( like #var# ) and str_replace():
> 
> while( $row=mysql_fetch_row($result) ) {
> echo str_replace( '#var#', $that_var, $row['entry'] );
> }
> 
> 
> 
> kgt
> 
> 
> 
> 
> Nathaniel Hall wrote:
> 
> >I am working on a project that uses an index.php page.  Depending on the
> >variable in the URL, a different php page is included.  I have a
> >config.php that contains variables that are accessible from any page.
> >That is the easy part.
> >
> >I have some pages pulling HTML out of a database. I would like to be
> >able to reference some of the variables in the config.php in the
> >database blob field.  Here is an example:
> >
> >[EMAIL PROTECTED]
> >--
> >...etc
> > >   include 'config.php';
> >   if (blabla) {
> >   include "thispage.php";
> >   } else {
> >   include "thatpage.php";
> >   }
> >?>
> >
> >config.php
> >--
> > >   $this_var=1;
> >   $that_var="Nothing";
> >?>
> >
> >test.php
> >--
> > >   $query="SELECT * from table";
> >   $result=mysql_query($query) or die ("Cannot process query");
> >   $row=mysql_fetch_row($result);
> >   echo $row[1];
> >?>
> >
> >MySQL record:
> >--
> >id,year,month,day,entry
> >
> >1,2005,01,01,This is a test
> >
> >_
> >I have tried using >? echo $that_var; ?< and I have tried
> >escaping everything, but that still didn't work.  Any ideas?
> >
> >Nathaniel Hall
> >[EMAIL PROTECTED]
> >
> >
> >
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
>

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



Re: [PHP] PHP code in a MySQL record

2005-07-29 Thread Kristen G. Thorson
Is there a particular reason you need *PHP* in the database?  If not, 
then use a placeholder system of some sort ( like #var# ) and str_replace():


while( $row=mysql_fetch_row($result) ) {
   echo str_replace( '#var#', $that_var, $row['entry'] );
}



kgt




Nathaniel Hall wrote:


I am working on a project that uses an index.php page.  Depending on the
variable in the URL, a different php page is included.  I have a
config.php that contains variables that are accessible from any page.
That is the easy part.

I have some pages pulling HTML out of a database. I would like to be
able to reference some of the variables in the config.php in the
database blob field.  Here is an example:

[EMAIL PROTECTED]
--
...etc


config.php
--


test.php
--


MySQL record:
--
id,year,month,day,entry

1,2005,01,01,This is a test

_
I have tried using >? echo $that_var; ?< and I have tried
escaping everything, but that still didn't work.  Any ideas?

Nathaniel Hall
[EMAIL PROTECTED]

 



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



[PHP] PHP code in a MySQL record

2005-07-28 Thread Nathaniel Hall
I am working on a project that uses an index.php page.  Depending on the
variable in the URL, a different php page is included.  I have a
config.php that contains variables that are accessible from any page.
That is the easy part.

I have some pages pulling HTML out of a database. I would like to be
able to reference some of the variables in the config.php in the
database blob field.  Here is an example:

[EMAIL PROTECTED]
--
...etc


config.php
--


test.php
--


MySQL record:
--
id,year,month,day,entry

1,2005,01,01,This is a test

_
I have tried using >? echo $that_var; ?< and I have tried
escaping everything, but that still didn't work.  Any ideas?

Nathaniel Hall
[EMAIL PROTECTED]

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



Re: [PHP] PHP CODE TO DISPLAY ISP

2005-03-29 Thread Colin Ross
and least we forgot about all the users coming from behind a proxy
farm with a different ip for each request..  AOL 

C


On Mon, 28 Mar 2005 12:28:32 -0700, Leif Gregory <[EMAIL PROTECTED]> wrote:
> Hello jenny,
> 
> Monday, March 28, 2005, 9:36:07 AM, you wrote:
> j> i am making a website in php and i will appreciate if anybody can
> j> tell me the php code to :
> j> - (1)display isp name,
> 
> One problem you're going to run into is that by using
> $_SERVER['REMOTE_ADDR'] oftentimes, you'll end up with just the IP.
> 
> I wrote the below to give me the hostname, which generally gives you
> the ISP information too, to fix a problem on a project I was doing.
> 
> If it won't resolve to a name (which does happen sometimes for
> machines behind corporate firewalls), I just displayed "No Reverse DNS"
> 
>  $pingResults = shell_exec('ping -a ' . $_SERVER['REMOTE_ADDR']);
> $temp = explode("\r\n",$pingResults);
> preg_match("/^Pinging\s([a-zA-Z0-9.]+)/", $temp[1], $hostname);
> if ($temp[4] == "Request timed out.")
>   $latency = "Unknown";
> else
>   $latency = $temp[4];
> ?>
> 
> Hostname:  preg_match("/^[a-z.]+/i",$hostname[1])) echo "No Reverse DNS"; else echo 
> $hostname[1]; ?>
> Latency: 
> 
> Geez, it's amazing when you dig back through old code you realize how
> much your coding skills sucked back then! 
> 
> --
> Leif (TB lists moderator and fellow end user).
> 
> Using The Bat! 3.0.9.9 Return (pre-beta) under Windows XP 5.1
> Build 2600 Service Pack 2 on a Pentium 4 2GHz with 512MB
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
>

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



Re: [PHP] PHP CODE TO DISPLAY ISP

2005-03-28 Thread Leif Gregory
Hello jenny,

Monday, March 28, 2005, 9:36:07 AM, you wrote:
j> i am making a website in php and i will appreciate if anybody can
j> tell me the php code to :
j> - (1)display isp name,

One problem you're going to run into is that by using
$_SERVER['REMOTE_ADDR'] oftentimes, you'll end up with just the IP.

I wrote the below to give me the hostname, which generally gives you
the ISP information too, to fix a problem on a project I was doing.

If it won't resolve to a name (which does happen sometimes for
machines behind corporate firewalls), I just displayed "No Reverse DNS"



Hostname: 
Latency: 

Geez, it's amazing when you dig back through old code you realize how
much your coding skills sucked back then! 




-- 
Leif (TB lists moderator and fellow end user).

Using The Bat! 3.0.9.9 Return (pre-beta) under Windows XP 5.1
Build 2600 Service Pack 2 on a Pentium 4 2GHz with 512MB

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



Re: [PHP] PHP CODE TO DISPLAY ISP

2005-03-28 Thread A. S. Milnes
On Mon, 2005-03-28 at 17:36, jenny mathew wrote:
> hello to all,
> i am making a website in php and i will appreciate if anybody can tell
> me the php code to :-
> (1)display isp name,
> (2) country of the visitor,
> (3)operatng system of the visitors.

Have a look at http://uk2.php.net/reserved.variables.

To get a guess of the country you then need to do a lookup on the IP
address.

Alan 

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



[PHP] PHP CODE TO DISPLAY ISP

2005-03-28 Thread jenny mathew
hello to all,
i am making a website in php and i will appreciate if anybody can tell
me the php code to :-
(1)display isp name,
(2) country of the visitor,
(3)operatng system of the visitors.
thanks,
waiting for your reply.
Regards,
Jenny

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



Re: [PHP] PHP code to analize email HELP

2005-01-09 Thread Zareef Ahmed
On Sun, 09 Jan 2005 18:00:09 -0800, Robby Russell <[EMAIL PROTECTED]> wrote:
> On Sun, 2005-01-09 at 19:20 -0500, Alejandro Marín Uribe wrote:
> > Hi all
> >
> > I really need help. I have an idea about to create a piece of code that it
> > analyze an email, extract certain data (this email contains Name, email and
> > telephone of a person in a standar html) and insert this data in MySQL
> > database. It this posible?
> >
> > I'm a newbie in PHP/MySQL, any ideas?
> >
> > Thanks,
> >

regular expressions are the answeres of your problems


zareef ahmed.


> > excuse my english
> >
> 
> You can probably search online and find some tutorials for this. Some
> terms that might help are 'php parse html email'
> 
> -Robby
> 
> --
> /***
> * Robby Russell | Owner.Developer.Geek
> * PLANET ARGON  | www.planetargon.com
> * Portland, OR  | [EMAIL PROTECTED]
> * 503.351.4730  | blog.planetargon.com
> * PHP/PostgreSQL Hosting & Development
> *--- Now supporting PHP5 ---
> /
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


-- 
Zareef Ahmed :: A PHP Developer in India ( Delhi )
Homepage :: http://www.zareef.net

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



Re: [PHP] PHP code to analize email HELP

2005-01-09 Thread Robby Russell
On Sun, 2005-01-09 at 19:20 -0500, Alejandro MarÃn Uribe wrote:
> Hi all
> 
> I really need help. I have an idea about to create a piece of code that it 
> analyze an email, extract certain data (this email contains Name, email and 
> telephone of a person in a standar html) and insert this data in MySQL 
> database. It this posible?
> 
> I'm a newbie in PHP/MySQL, any ideas?
> 
> Thanks,
> 
> excuse my english 
> 

You can probably search online and find some tutorials for this. Some
terms that might help are 'php parse html email'

-Robby

-- 
/***
* Robby Russell | Owner.Developer.Geek
* PLANET ARGON  | www.planetargon.com
* Portland, OR  | [EMAIL PROTECTED]
* 503.351.4730  | blog.planetargon.com
* PHP/PostgreSQL Hosting & Development
*--- Now supporting PHP5 ---
/

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



[PHP] PHP code to analize email HELP

2005-01-09 Thread Alejandro Marín Uribe
Hi all

I really need help. I have an idea about to create a piece of code that it 
analyze an email, extract certain data (this email contains Name, email and 
telephone of a person in a standar html) and insert this data in MySQL 
database. It this posible?

I'm a newbie in PHP/MySQL, any ideas?

Thanks,

excuse my english 

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



[PHP] PHP code causing very high load.  Assistance with cause / diagnosis

2004-06-21 Thread Mark Hutchinson
Morning,

I am hoping that some expert here can shed some light on how I can find out 
why
some PHP code is causing very high load on a Linux server I have.

The code is a Trillium Chat/forums board written in PHP.  There are times of
very high load that it causes that are un-usually high.  Like 500% increases
and more from time to time.  I have put on the IONCube PHPA but that did not
seem to help.

Some of the PHP has been modified and more added.  I am wondering if there is
any software available that can look at it to find loops, bad coding
practice,etc, that might cause this.

Any other reccomendations on what I could do to optimize, anyalyze etc. this?

Assistance appreciated.

Mark

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



Re: [PHP] php code in a .js file?

2004-04-29 Thread Marek Kilimajer
Craig Donnelly wrote:
Why not just use a .php instead of a .js?



Regards,

Craig
That was what I meant ;)

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


Re: [PHP] php code to connect to MS-SQL SERVER

2004-03-18 Thread Adam Voigt
mssql_connect('repo',$User,$Pass);
mssql_select_db('test');

On Thu, 2004-03-18 at 02:31, Rafi Sheikh wrote:
> Hello folks.
> 
> Basics: Apache 1.3.29, PHP 4.3.4, on WIN 2K-Pro   
> 
> SYS DSN=using SQL Server driver a connection exists (tested via Ms-Access)
> against a SQL Server
> 
> PROBLEM: I am very new in php, therefore requesting if a simple snippet of
> code can be listed showing the proper way of making a connection to a SQL
> server in a PHP script.
> 
> Names to Use:
> System DNS=repo
> SQL Server Database name=test
> User=rookie
> 
> 
> I tried 
> he manual on PHP site, and read about ODBC_connect and odbc_fetch_array but
> I admit that at 1.30 in the morning I am way over my head on this.  Any
> pointer to a source (beg level) or help with a code snippet is deeply
> appreciated.
> 
> Regards,
> 
> RS
> 
> 
> 
> This e-mail, including attachments, may include confidential and/or
> proprietary information, and may be used only by the person or entity to
> which it is addressed. If the reader of this e-mail is not the intended
> recipient or his or her authorized agent, the reader is hereby notified that
> any dissemination, distribution or copying of this e-mail is prohibited. If
> you have received this e-mail in error, please notify the sender by replying
> to this message and delete this e-mail immediately.
-- 

Adam Voigt
[EMAIL PROTECTED]

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



[PHP] php code to connect to MS-SQL SERVER

2004-03-18 Thread Rafi Sheikh
Hello folks.

Basics: Apache 1.3.29, PHP 4.3.4, on WIN 2K-Pro 

SYS DSN=using SQL Server driver a connection exists (tested via Ms-Access)
against a SQL Server

PROBLEM: I am very new in php, therefore requesting if a simple snippet of
code can be listed showing the proper way of making a connection to a SQL
server in a PHP script.

Names to Use:
System DNS=repo
SQL Server Database name=test
User=rookie


I tried 
he manual on PHP site, and read about ODBC_connect and odbc_fetch_array but
I admit that at 1.30 in the morning I am way over my head on this.  Any
pointer to a source (beg level) or help with a code snippet is deeply
appreciated.

Regards,

RS



This e-mail, including attachments, may include confidential and/or
proprietary information, and may be used only by the person or entity to
which it is addressed. If the reader of this e-mail is not the intended
recipient or his or her authorized agent, the reader is hereby notified that
any dissemination, distribution or copying of this e-mail is prohibited. If
you have received this e-mail in error, please notify the sender by replying
to this message and delete this e-mail immediately.

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



Re: [PHP] PHP code encryption

2004-02-03 Thread Jason Sheets
I and another person am now maintaining Turck MMCache, another release 
will be made shortly but until then the current release should work fine.

There is also a web based encoder for Turck MMCache at 
http://phpcoder.sourceforge.net

The great thing about MMCache is it is open source and usually 
considerably faster than the other free/commercial encoders.  It matches 
and exceeds Zend's own products in many cases.

Jason

Adrian Teasdale wrote:

Here are some for you to try:

www.sourceguardian.com
www.zend.com
www.ioncube.com
There is also one within mmCache
(http://turck-mmcache.sourceforge.net/).  Just read the forum about the
current status of this open source project as the founder has gone to
work for Zend and will no longer be maintaining the project himself
(although others might).
Ade

 

-Original Message-
From: Hamid Hossain [mailto:[EMAIL PROTECTED] 
Sent: 03 February 2004 16:04
To: [EMAIL PROTECTED]
Subject: [PHP] PHP code encryption

Hi,

I am working in a project for a customer of my company, I am 
using PHP and I 
want to prevent my customer from touching my code.

The problem that I have to install the application in the 
customer computer. 
So, I am looking for a way to encrypt my PHP code.

I heard that there is a way but I don't have details. How to 
do this? Is it 
legal to be used in a commercial purposes? Is it free? Should 
I install 
somthing in the customer's pc to decrypt my code? Could I 
have some not 
encrypted pages (eg: config.php) ?

Thanks,
Hamid Hossain
_
Help STOP SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail

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

 

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


RE: [PHP] PHP code encryption

2004-02-03 Thread Adrian Teasdale
Here are some for you to try:

www.sourceguardian.com
www.zend.com
www.ioncube.com

There is also one within mmCache
(http://turck-mmcache.sourceforge.net/).  Just read the forum about the
current status of this open source project as the founder has gone to
work for Zend and will no longer be maintaining the project himself
(although others might).

Ade


> -Original Message-
> From: Hamid Hossain [mailto:[EMAIL PROTECTED] 
> Sent: 03 February 2004 16:04
> To: [EMAIL PROTECTED]
> Subject: [PHP] PHP code encryption
> 
> 
> Hi,
> 
> I am working in a project for a customer of my company, I am 
> using PHP and I 
> want to prevent my customer from touching my code.
> 
> The problem that I have to install the application in the 
> customer computer. 
> So, I am looking for a way to encrypt my PHP code.
> 
> I heard that there is a way but I don't have details. How to 
> do this? Is it 
> legal to be used in a commercial purposes? Is it free? Should 
> I install 
> somthing in the customer's pc to decrypt my code? Could I 
> have some not 
> encrypted pages (eg: config.php) ?
> 
> Thanks,
> Hamid Hossain
> 
> _
> Help STOP SPAM with the new MSN 8 and get 2 months FREE*  
> http://join.msn.com/?page=features/junkmail
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

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



[PHP] PHP code encryption

2004-02-03 Thread Hamid Hossain
Hi,

I am working in a project for a customer of my company, I am using PHP and I 
want to prevent my customer from touching my code.

The problem that I have to install the application in the customer computer. 
So, I am looking for a way to encrypt my PHP code.

I heard that there is a way but I don't have details. How to do this? Is it 
legal to be used in a commercial purposes? Is it free? Should I install 
somthing in the customer's pc to decrypt my code? Could I have some not 
encrypted pages (eg: config.php) ?

Thanks,
Hamid Hossain
_
Help STOP SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail

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


RE: [PHP] PHP code documentation tool

2004-01-08 Thread Vincent Jansen
I prefer phpDocumentor

http://phpdocu.sourceforge.net/


---
Vincent Jansen


-Original Message-
From: Richard Davey [mailto:[EMAIL PROTECTED] 
Sent: donderdag 8 januari 2004 16:44
To: Karam Chand
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] PHP code documentation tool


Hello Karam,

Thursday, January 8, 2004, 3:41:36 PM, you wrote:

KC> Is there any tool like doc-o-matic for PHP or anybody developing 
KC> something like that?

http://www.phpdoc.de/

-- 
Best regards,
 Richardmailto:[EMAIL PROTECTED]

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

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



Re: [PHP] PHP code documentation tool

2004-01-08 Thread Matt Matijevich
[snip]
What is the best way to document such projects? How
you developers document your project?
[/snip]

GIYF

http://phpdocu.sourceforge.net/ 
http://www.epersonae.com/snapping/archives/000390.php 

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



Re: [PHP] PHP code documentation tool

2004-01-08 Thread Richard Davey
Hello Karam,

Thursday, January 8, 2004, 3:41:36 PM, you wrote:

KC> Is there any tool like doc-o-matic for PHP or anybody
KC> developing something like that?

http://www.phpdoc.de/

-- 
Best regards,
 Richardmailto:[EMAIL PROTECTED]

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



[PHP] PHP code documentation tool

2004-01-08 Thread Karam Chand
Hello

I recently got a fairly big project in PHP. Before
starting I would like to clear some doubts.

What is the best way to document such projects? How
you developers document your project?

For .NET etc. there are many documentation tools like
doc-o-matic etc.

Do we need to document the code based on rules for
such software...or you create your own PHP script to
extract comments?

Is there any tool like doc-o-matic for PHP or anybody
developing something like that?

Karam

__
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus

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



RE: [PHP] php code

2003-10-21 Thread Jay Blanchard
[snip]
  Actually i have created the field type as varchar..i am need to insert
some decimal values in that varchar field and use that values for
calculation...so it is possible to store the float value eventhough i
specified as varchar ?..and also i can use that values for calculation
??
[/snip]

This is more of a SQL question, but the short answer (with PHP) is yes,
you can use 'values' stored in varchar fields for calculation in PHP.
You may have to retrieve the value from the DB and then cast it to your
liking. See http://www.php.net/settype (it may be set_type, I am working
on less than one cup of coffee this morning thus far.

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



[PHP] php code

2003-10-21 Thread Uma Shankari T.

Hello,

  Actually i have created the field type as varchar..i am need to insert
some decimal values in that varchar field and use that values for
calculation...so it is possible to store the float value eventhough i
specified as varchar ?..and also i can use that values for calculation ??


Regards,
Uma

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



Re: [PHP] PHP code in form field - var_export() (slashes)?

2003-09-24 Thread Jason Wong
On Wednesday 24 September 2003 22:43, Shawn McKenzie wrote:

> I'm storing some multi-dimensional associative arrays in the file and then
> when I need the values somewhere I just include the file and voila my
> arrays are defined.  Seemed better than looping through arrays writing to a
> file and then using the same loop structure to read lines from the file and
> assign back to the same array that I had it in in the first place.

Still don't understand why you're using var_export(). You said that the 
textarea contained php code right? Could you give an example of the kind of 
code that you would enter into the textarea?

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
No matter how much care and money you put into your antique collection, your 
neighbors are still going to think its trash. 
-- Cohan's Edict
*/

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



Re: [PHP] PHP code in form field - var_export() (slashes)?

2003-09-24 Thread Shawn McKenzie
I'm storing some multi-dimensional associative arrays in the file and then
when I need the values somewhere I just include the file and voila my arrays
are defined.  Seemed better than looping through arrays writing to a file
and then using the same loop structure to read lines from the file and
assign back to the same array that I had it in in the first place.

Thanks!
-Shawn

"Jason Wong" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Wednesday 24 September 2003 12:00, Shawn McKenzie wrote:
>
> > O.K.  I am collecting PHP code in a textarea and then using var_export()
to
> > a file for later use.  In the file, the PHP is in single-quotes.
>
> I'm curious, why are you using var_export() if it's causing so many
problems?
> Acutally why are you using var_export() at all, am I missing something?
>
> Couldn't you just write the string containing the contents of the textarea
> straight out to a file?
>
> -- 
> Jason Wong -> Gremlins Associates -> www.gremlins.biz
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
> --
> Search the list archives before you post
> http://marc.theaimsgroup.com/?l=php-general
> --
> /*
> The only function of economic forecasting is to make astrology look
> respectable.
> -- John Kenneth Galbraith
> */

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



Re: [PHP] PHP code in form field - var_export() (slashes)?

2003-09-23 Thread Jason Wong
On Wednesday 24 September 2003 12:00, Shawn McKenzie wrote:

> O.K.  I am collecting PHP code in a textarea and then using var_export() to
> a file for later use.  In the file, the PHP is in single-quotes.

I'm curious, why are you using var_export() if it's causing so many problems? 
Acutally why are you using var_export() at all, am I missing something?

Couldn't you just write the string containing the contents of the textarea 
straight out to a file?

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
The only function of economic forecasting is to make astrology look 
respectable.
-- John Kenneth Galbraith
*/

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



[PHP] PHP code in form field - var_export() (slashes)?

2003-09-23 Thread Shawn McKenzie
O.K.  I am collecting PHP code in a textarea and then using var_export() to
a file for later use.  In the file, the PHP is in single-quotes.

I am having issues trying to make sure that things are escaped correctly.

If PHP code is submitted with no single-quotes and no escaping, then all is
well.  If magic_quotes_gpc = 1 then i just use stripslashes().

If PHP code is submitted and the code has slashes in it already ( example:
echo "http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP code generation

2003-09-05 Thread Chris Hubbard
I'm working on a code generation project.  Is there anyone on the list who
has experience building these things, and, would like to discuss
architecture/patterns/structure of code generation off-list?


Chris Hubbard
[EMAIL PROTECTED]
www.wildcharacters.com
425 481 2020

php based web application development

Y! [EMAIL PROTECTED]
MSN [EMAIL PROTECTED]
AIM ganeshacph

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



[PHP] PHP code beautifier?

2003-07-17 Thread Jacob Vennervald Madsen
Hi List

Does anybody know any good PHP code beautifiers/formaters?
Preferably one which is configurable so I can specify the exact format I 
want.

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


[PHP] PHP Code inside Zend_API

2003-06-21 Thread Suhas Pharkute
I have a custom extension for windows (dll which can be used in PHP).

I want to run some php code inside this dll module. I searched for Zend_API
Docs, but I could not find any way to run php code inside this API.

Any Ideas how to do this,

Please help!

Thanks
Suhas


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



Re: [PHP] Php code to create php code

2003-06-11 Thread Ernest E Vogelsinger
At 14:05 11.06.2003, Sancar Saran said:
[snip]
>Hi,
>Is there any example or/and tutorial for create php code with using php.
[snip] 

It's simple, frankly:

$code = EOC
echo 'Hello World, the current time is ', date('H:i:s'), '';
EOC;

eval($code);

The complexity is up to you ;-)


-- 
   >O Ernest E. Vogelsinger
   (\)ICQ #13394035
^ http://www.vogelsinger.at/



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



[PHP] Php code to create php code

2003-06-11 Thread Sancar Saran
Hi,
Is there any example or/and tutorial for create php code with using php.

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



[PHP] php code arranging program

2003-02-21 Thread mashar
hi all,
i want to organize  some php code making by someone else for being good
looking and being understandable  . for this work  is there a any program?
thanks
mashar





Re: [PHP] php code in templates... how to?

2002-10-03 Thread olinux

eval() should work for you
http://www.php.net/eval

You also may want to consider including files coded
something like this:











Then you just set the values for the vars in your code
- include the file.

Josh


--- Hendrik Daldrup <[EMAIL PROTECTED]>
wrote:
> Hi,
> 
> i am working with templates, which i put into a
> string ($user_screen) 
> and in the end i make the output with
> 
> echo $user_screen;
> 
> where $user_screen would contain the template file
> data.
> However, if the $user_screen contains any php code
> it gets echo'ed as 
> well, instead of parsed.
> (ok, that sounds logical),
> but is there a way i can make php parse the php code
> within this string?
> 
> i thought, that maybe "include" would work that way,
> but its not 
> possible to include a string, is it?
> 
> thx
> 
> Hendrik
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


__
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com

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




[PHP] php code in templates... how to?

2002-10-03 Thread Hendrik Daldrup

Hi,

i am working with templates, which i put into a string ($user_screen) 
and in the end i make the output with

echo $user_screen;

where $user_screen would contain the template file data.
However, if the $user_screen contains any php code it gets echo'ed as 
well, instead of parsed.
(ok, that sounds logical),
but is there a way i can make php parse the php code within this string?

i thought, that maybe "include" would work that way, but its not 
possible to include a string, is it?

thx

Hendrik




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




Re: [PHP] PHP code optimization

2002-07-09 Thread Nick Oostveen

I could be wrong, but I seem to remember reading somewhere that using ?> 
text  Peter Thoenen wrote:
>
>>Question on optimizing code for quicker runtimes. Which is quicker (this 
>>is on a webpage also..NOT
>>commandline)?
>>
>>
>>
>>OR
>>
>> abc 
>
>Because the difference is going to be undetectable, this would probably be 
>a question that only someone really familiar with the engine would be able 
>to answer with any sort of assurance.
>
>My bet is that the second method is faster in theory, because switching 
>in/out of PHP is likely marginally faster than executing the echo 
>function. Maybe if you create some scripts that loop through these 
>statements 10,000 times each and measure the time with microtime(), you 
>can get a more affirmative answer and let the list know your results.
>
>Happy hacking.
>
>Chris
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>


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




Re: [PHP] PHP code optimization

2002-07-09 Thread Chris Shiflett

Peter Thoenen wrote:

>Question on optimizing code for quicker runtimes. 
>Which is quicker (this is on a webpage also..NOT
>commandline)?
>
>
>
>OR
>
> abc 
>

Because the difference is going to be undetectable, this would probably 
be a question that only someone really familiar with the engine would be 
able to answer with any sort of assurance.

My bet is that the second method is faster in theory, because switching 
in/out of PHP is likely marginally faster than executing the echo 
function. Maybe if you create some scripts that loop through these 
statements 10,000 times each and measure the time with microtime(), you 
can get a more affirmative answer and let the list know your results.

Happy hacking.

Chris


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




Re: [PHP] PHP code optimization

2002-07-09 Thread Analysis & Solutions

On Tue, Jul 09, 2002 at 12:32:59PM -0700, Peter Thoenen wrote:
> Which is quicker (this is on a webpage also..NOT
> commandline)?
> 
> 
> OR
>  abc 

The difference is very marginal.  Write whichever makes more sense in the
context.  Short tidbits just don't matter.  Larger stretches of text are
easier to just send out as is rather than echo.

--Dan

-- 
   PHP classes that make web design easier
SQL Solution  |   Layout Solution   |  Form Solution
sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

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




Re: [PHP] PHP code optimization

2002-07-09 Thread Kevin Stone

I'm just guessing but I would think there would be no difference.  The only
way I think there would be a differnce is if you did many many echo
statements as opposed to one echo or one ?>output block
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 09, 2002 1:32 PM
Subject: [PHP] PHP code optimization


> Question on optimizing code for quicker runtimes.
> Which is quicker (this is on a webpage also..NOT
> commandline)?
>
> 
>
> OR
>
>  abc 
>
> Both do the same thing and are legit but wondering
> which is better from an optimization standpoint (NOT
> interested in readability or *proper* code here)
>
> -Peter
>
> __
> Do You Yahoo!?
> Sign up for SBC Yahoo! Dial - First Month Free
> http://sbc.yahoo.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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




[PHP] PHP code optimization

2002-07-09 Thread Peter Thoenen

Question on optimizing code for quicker runtimes. 
Which is quicker (this is on a webpage also..NOT
commandline)?



OR

 abc 

Both do the same thing and are legit but wondering
which is better from an optimization standpoint (NOT
interested in readability or *proper* code here)

-Peter

__
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com

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




RE: [PHP] PHP code in a database

2002-06-07 Thread Jared Boelens

This might be what you need.
http://www.php.net/manual/en/function.eval.php

-Jared

-Original Message-
From: Jean-Rene Cormier [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 07, 2002 12:11 PM
To: [EMAIL PROTECTED]
Subject: [PHP] PHP code in a database


I'm trying to make a script that'll take some pages from a database but
I want it to execute the PHP that's in the pages that it'll fetch from
the database.

Say it gets the data from the page in $data I want it to put the data on
the screen and if there's some PHP code in the $data variable I want it
to be executed. Is there a way I can do that?

Jean-Rene Cormier




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



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




Re: [PHP] PHP code in a database

2002-06-07 Thread Mark Heintz PHP Mailing Lists

You want the eval() function.

manual entry:
http://www.php.net/eval

mh.


On Fri, 7 Jun 2002, Jean-Rene Cormier wrote:

> I'm trying to make a script that'll take some pages from a database but
> I want it to execute the PHP that's in the pages that it'll fetch from
> the database.
>
> Say it gets the data from the page in $data I want it to put the data on
> the screen and if there's some PHP code in the $data variable I want it
> to be executed. Is there a way I can do that?
>
> Jean-Rene Cormier


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




[PHP] PHP code in a database

2002-06-07 Thread Jean-Rene Cormier

I'm trying to make a script that'll take some pages from a database but
I want it to execute the PHP that's in the pages that it'll fetch from
the database.

Say it gets the data from the page in $data I want it to put the data on
the screen and if there's some PHP code in the $data variable I want it
to be executed. Is there a way I can do that?

Jean-Rene Cormier




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




Re: [PHP] php code generator

2002-03-21 Thread Cameron Bales .:.

>We are trying to find a php code generator like Macromedia Ultradelv to
>develope a web base app.  Can someone recommend a few.

the new GoLive does it, and has the Zend debugger integrated in it. 
I don't know how good it is.


http://www.adobe.com/products/golive/movie_qt9.html

the scary part is the way he repeats "ASP, JSP, or PHP" about 300 
times in 3 minutes.

Cameron .:.

--
Tantramar Interactive
http://www.TantramarInteractive.com/
16 Lorne St., Unit 3, Sackville, NB  E4L 3Z7
Phone (506) 364-1097  Fax (506) 536-2409
All that glitters has a high refractive index.

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




[PHP] php code generator

2002-03-20 Thread W McCloud

We are trying to find a php code generator like Macromedia Ultradelv to
develope a web base app.  Can someone recommend a few.



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




RE: [PHP] php code beautifier

2001-12-28 Thread Jerry Verhoef (UGBI)

What is a code beautifier?

-Original Message-
From: George Nicolae [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 28, 2001 1:47 AM
To: [EMAIL PROTECTED]
Subject: [PHP] php code beautifier


do you know if exist a php code beautifier for win32? pls tell me the
address.

--


Best regards,
George Nicolae
IT Manager
___
X-Playin - Professional Web Design
www.x-playin.f2s.com






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


The information contained in this email is confidential and
may be legally privileged. It is intended solely for the 
addressee. Access to this email by anyone else is 
unauthorized. If you are not the intended recipient, any 
form of disclosure, production, distribution or any action 
taken or refrained from in reliance on it, is prohibited and 
may be unlawful. Please notify the sender immediately.

The content of the email is not legally binding unless 
confirmed by letter bearing two authorized signatures.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] php code beautifier

2001-12-27 Thread George Nicolae

do you know if exist a php code beautifier for win32? pls tell me the
address.

--


Best regards,
George Nicolae
IT Manager
___
X-Playin - Professional Web Design
www.x-playin.f2s.com






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] PHP code organization...

2001-11-22 Thread Dimitris Kossikidis

Try to break up html  into different files for each browser type.

Switch ($browser)
{
case "ns4" :
include ns4.html; break;
case "ie5" :
include ie5.html; break;
.
.
.
default :
include ie6.html;
}


> -Original Message-
> From: Navid Yar [mailto:[EMAIL PROTECTED]] 
> Sent: Thursday, November 22, 2001 10:19 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] PHP code organization...
> Importance: High
> 
> 
> Ok, this is very important to me, but
> I'm not sure how to explain it well. I
> am working on a project using PHP that
> supports about 6 different browsers and
> browser versions. All the code is in one
> single file for now, but I will
> eventually split the code up and call
> them using several include files. The
> problem is that when I start writing the
> code and it doesn't support a specific
> browser version, I customize the code
> with some browser sniffing...for
> example:
> 
> 
> 
>
>   first column
>
>
>
>   second column
>
> { ?>
>// using different field-color for
> this browser version...
>
>   second column
>
>
>// using different field-color for
> this browser version...
>
>   second column
>
>
> 
> 
> 
> This is not a real-world example, but it
> works for trying to explain my problem.
> The code is messy. The sniffing is done
> earlier and is set by $browser, which
> holds a value depending on which browser
> the user is using at the moment they
> access the page. I want this code to
> look as normal as html can possibly
> look, with a less ambiguous tree-like
> flow, in the following format for
> example:
> 
> 
> 
>
>   first column
>
>
>   second column
>
> 
> 
> 
> How would you guys organize the code to
> where it makes the best use of whichever
> browser is being used, but with less
> messy code? I probably haven't explained
> it well, but if you have any questions
> please let me know and I'll be more than
> happy to answer them. By the way, I'm a
> newbie at PHP, and so far I think it's
> the best thing that has ever happened to
> the web. Thanks in advance.  :)
> 
> Navid
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: 
> [EMAIL PROTECTED] To contact the list 
> administrators, e-mail: [EMAIL PROTECTED]
> 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] PHP code organization...

2001-11-22 Thread Navid Yar

Ok, this is very important to me, but
I'm not sure how to explain it well. I
am working on a project using PHP that
supports about 6 different browsers and
browser versions. All the code is in one
single file for now, but I will
eventually split the code up and call
them using several include files. The
problem is that when I start writing the
code and it doesn't support a specific
browser version, I customize the code
with some browser sniffing...for
example:



   
  first column
   
   
   
second column
   
   
   // using different field-color for
this browser version...
   
second column
   
   
   // using different field-color for
this browser version...
   
second column
   
   



This is not a real-world example, but it
works for trying to explain my problem.
The code is messy. The sniffing is done
earlier and is set by $browser, which
holds a value depending on which browser
the user is using at the moment they
access the page. I want this code to
look as normal as html can possibly
look, with a less ambiguous tree-like
flow, in the following format for
example:



   
  first column
   
   
second column
   



How would you guys organize the code to
where it makes the best use of whichever
browser is being used, but with less
messy code? I probably haven't explained
it well, but if you have any questions
please let me know and I'll be more than
happy to answer them. By the way, I'm a
newbie at PHP, and so far I think it's
the best thing that has ever happened to
the web. Thanks in advance.  :)

Navid



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] php code to fax

2001-10-26 Thread Chris Carbaugh


I have finally uploaded a tar ball to the phpfax.sourceforge.net
website.

All the code is there, but it will take a good bit of work to get the
whole thing working.  Those who have shown interest in the project will
probably just be interested in parts of the code for there own
projects.

If you have any questions, I'll do my best to help you out.

Chris

On Fri, 26 Oct 2001, Glenn Antoine wrote:
> Date: Fri, 26 Oct 2001 08:20:12 -0500
> To: <[EMAIL PROTECTED]>
> From: "Glenn Antoine" <[EMAIL PROTECTED]>
> Subject: RE: [PHP] php code to fax
> 
> Chris,
> 
> I just wanted to touch base with you to see if you had received my
> email.
> I would be very interested in obtaining a copy of what you have to
> date.  It
> seems that you have solved some of the very problems that I am
> dealing with.
> Again thanks for your help with this.
> 
> Glenn
> 
> 
> -Original Message-
> From: Chris Carbaugh [mailto:[EMAIL PROTECTED]]
> Sent: Monday, October 22, 2001 1:59 PM
> To: Glenn Antoine; [EMAIL PROTECTED]
> Subject: Re: [PHP] php code to fax
> 
> 
> 
> Check out phpfax.sourceforge.net
> 
> This is a project I have pretty much abandoned, and never even posted
> the code.  I have had some people interested in it though, and would
> like to give the code to the community, I just never found the time.
> 
> Drop me a line if your interested, and I'll do my best to gather the
> code into a tarball and post it.
> 
> Chris
> 
> On Mon, 22 Oct 2001, Glenn Antoine wrote:
> > Date: Mon, 22 Oct 2001 08:38:42 -0500
> > To: [EMAIL PROTECTED]
> > From: Glenn Antoine <[EMAIL PROTECTED]>
> > Reply-To: [EMAIL PROTECTED]
> > Subject: [PHP] php code to fax
> >
> > I am working on a project that will require the ability to take
> input
> > from a web interface and then fax the content out to some of the
> > members.  If anyone has had any experience with a similar project,
> I
> > would greatly appreciate any assistance.
> >
> > Thanks in advance,
> > Glenn
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail:
> > [EMAIL PROTECTED]
> >
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




  1   2   >