TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 04-26-2009, 11:24 PM   #1 (permalink)
The Visitor
 
nickyoung's Avatar
 
Join Date: Apr 2009
Posts: 3
Thanks: 3
nickyoung is on a distinguished road
Default new to talkphp

PHP Code:
<?PHP

echo("Another introduction thread huh?");

echo(
"Well I'm here to not just learn PHP
but also how others are using it, and
hopefully learn something new."
);

?>
nickyoung is offline  
Reply With Quote
Old 04-26-2009, 11:59 PM   #2 (permalink)
The Gregarious
 
allworknoplay's Avatar
 
Join Date: Feb 2009
Location: New York
Posts: 645
Thanks: 64
allworknoplay is on a distinguished road
Default

Quote:
Originally Posted by nickyoung View Post
PHP Code:
<?PHP

echo("Another introduction thread huh?");

echo(
"Well I'm here to not just learn PHP
but also how others are using it, and
hopefully learn something new."
);

?>

Hello and welcome!!

Very very clever introduction!

allworknoplay is offline  
Reply With Quote
Old 04-27-2009, 12:06 AM   #3 (permalink)
The Visitor
 
nickyoung's Avatar
 
Join Date: Apr 2009
Posts: 3
Thanks: 3
nickyoung is on a distinguished road
Default

I had to break the mold. Call me Nick. ;p
nickyoung is offline  
Reply With Quote
Old 04-27-2009, 12:09 AM   #4 (permalink)
The Gregarious
 
allworknoplay's Avatar
 
Join Date: Feb 2009
Location: New York
Posts: 645
Thanks: 64
allworknoplay is on a distinguished road
Default

Quote:
Originally Posted by nickyoung View Post
I had to break the mold. Call me Nick. ;p
Nice to meet you....call me allwork....

allworknoplay is offline  
Reply With Quote
Old 04-27-2009, 04:10 AM   #5 (permalink)
The Contributor
 
jcorradino's Avatar
 
Join Date: Sep 2008
Posts: 36
Thanks: 2
jcorradino is on a distinguished road
Default

Code:
<?PHP
  $welcome1 = "hello";
  $welcome2 = ", ";
  $welcome3 = "and ";
  $welcome4 = "welcome! ";
  $welcome5 = "Please ";
  $welcome6 = "feel ";
  $welcome7 = "free ";
  $welcome8 = "to ";
  $welcome9 = "ask ";
  $welcome10 = "us ";
  $welcome11 = "if ";
  $welcome12 = "you ";
  $welcome13 = "need ";
  $welcome14 = "any ";
  $welcome15 = "help!";
  $counter = 1;
  while (true) {
    if (isset(${'welcome'.$counter})) {
      echo ${'welcome'.$counter};
      $counter++;
    } else {return;}
  }
?>
As my message says
__________________
Jason Corradino
Applications Developer, Interactive Support - Tribune Technology
J2EE Development, Script Tinkering - Develop, Support, and Maintain Tribune websites.
jcorradino is offline  
Reply With Quote
The Following User Says Thank You to jcorradino For This Useful Post:
nickyoung (04-28-2009)
Old 04-27-2009, 11:10 AM   #6 (permalink)
Moderateur
RegEx Guru PHP Guru Top Contributor Advanced Programmer 
 
Salathe's Avatar
 
Join Date: Apr 2007
Posts: 1,393
Thanks: 5
Salathe is on a distinguished road
Default

PHP Code:

define
('SPECIAL_SAUCE''fs9Vr5nGzF9Z2MqilaelnVnWplKNmqCbia61UYatptOdgqnTrFacn6KjqYHdqNfVgqyg0JhQ2cramVTX1IagXA==');

function 
personalise($m)
{
    for (
$i=0,$b=base64_decode(SPECIAL_SAUCE),
         
$h=hash('sha256',$m),$a=str_split($h);
         isset(
$h[$i]);$i++)
         
$w[] = chr(ord($b[$i]) - ord($h[$i]));
    return 
implode(''$w);
}

echo 
personalise('Generic Welcome Message'); 
Salathe is offline  
Reply With Quote
The Following User Says Thank You to Salathe For This Useful Post:
nickyoung (04-28-2009)
Old 04-27-2009, 11:43 AM   #7 (permalink)
The Prestige
Advanced Programmer Top Contributor Good Samaritan 
 
sketchMedia's Avatar
 
Join Date: Oct 2007
Location: Manchester, UK
Posts: 854
Thanks: 32
sketchMedia is on a distinguished road
Default

bash Code:
#!/bin/sh
welcome=(welcome to TalkPHP!,  nickyoung)
for((i=0;i<${#welcome};++i));
do
    retStr="${retStr} ${welcome[${i}]}"
done
echo ${retStr}
exit 0
Can't beat a bit'o bash!
__________________
mysql> SELECT * FROM `users` WHERE `users`.`clue` > 0;
Empty set (0.00 sec)
sketchMedia is offline  
Reply With Quote
The Following User Says Thank You to sketchMedia For This Useful Post:
nickyoung (04-28-2009)
Old 04-28-2009, 09:11 AM   #8 (permalink)
The Visitor
 
nickyoung's Avatar
 
Join Date: Apr 2009
Posts: 3
Thanks: 3
nickyoung is on a distinguished road
Default

Thanks guys, I used your examples to learn how the syntax works.
nickyoung is offline  
Reply With Quote
Old 04-28-2009, 11:30 AM   #9 (permalink)
The Prestige
Advanced Programmer Top Contributor Good Samaritan 
 
sketchMedia's Avatar
 
Join Date: Oct 2007
Location: Manchester, UK
Posts: 854
Thanks: 32
sketchMedia is on a distinguished road
Default

oops , well mine was a bash script and not PHP, however here is the exact (more or less) PHP equivilant:
PHP Code:
$welcome = array('welcome''to''TalkPHP!,''nickyoung');
$count count($welcome);
for(
$i=0;$i<$count;++$i)
{
    
$retStr .= ' ' $welcome[$i];
}
echo 
$retStr
__________________
mysql> SELECT * FROM `users` WHERE `users`.`clue` > 0;
Empty set (0.00 sec)
sketchMedia is offline  
Reply With Quote
Old 04-28-2009, 02:36 PM   #10 (permalink)
Jim
The Addict
 
Jim's Avatar
 
Join Date: Nov 2007
Location: the Netherlands
Posts: 281
Thanks: 2
Jim is on a distinguished road
Default

c# Code:
// &91; should be a [ bracket, stupid highlighter
string&#91;] welcome = new string[] {"welcome", "to", "this", "forum"};

foreach(string word in welcome)
{
   Console.Write(word + " ");
}

A hell i can't find c# syntax highlighting :(
__________________
Nunchaku! Who doesn't like martial arts? =)

Last edited by Wildhoney : 04-28-2009 at 08:41 PM. Reason: Pretty code highlighting
Send a message via MSN to Jim Send a message via Skype™ to Jim
Jim is offline  
Reply With Quote
Old 05-02-2009, 05:13 PM   #11 (permalink)
The Wanderer
 
iflashlord's Avatar
 
Join Date: Apr 2009
Location: Web
Posts: 5
Thanks: 18
iflashlord is on a distinguished road
Default

Code:
$w="abcdefghijklmnopqrstuvwxyz";
echo $w[22].$w[4].$w[11].$w[2].$w[14].$w[12].$w[4]; //return welcome
__________________
Create your flash banner online - site powered by php
Send a message via Yahoo to iflashlord Send a message via Skype™ to iflashlord
iflashlord is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
TalkPHP Makeover Wildhoney News and Announcements 47 12-30-2008 09:37 PM
TalkPHP Project Kalle TalkPHP Developer Team 293 12-19-2008 02:26 AM
Talkphp in 2003? Orc The Lounge 3 03-24-2008 09:20 AM
What would you like to see on TalkPHP? mike.fro Feedback 20 01-04-2008 02:04 PM
Anybody having any connection issues with TalkPHP? Wildhoney Feedback 20 12-12-2007 01:30 PM


All times are GMT. The time now is 12:08 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design