Home Forums Register FAQ Members List Calendar Search Today's Posts Mark Forums Read Arcade Chat
Go Back   ClubPenguinHQ Forums > General Discussion > Programming > PHP
Reload this Page Php Challenge 2
PHP Discussion of PHP scripts belongs here.

Php Challenge 2

Reply
 
LinkBack Thread Tools Display Modes
Php Challenge 2
Old
  (#1)
Shadow is Offline
Member
Shadow is an unknown quantity at this point
 
Posts: 265
Join Date: May 2008
Rep Power: 0
   
Default Php Challenge 2 - Tuesday, July 7th, 2009

A pretty easy one not too hard.

PHP Code:
<?php

function stribet($inputstr$delimiterLeft$delimiterRight){
  
$posLeft stripos($inputstr$delimiterLeft) + strlen($delimiterLeft);
  
$posRight stripos($inputstr$delimiterRight$posLeft);
  return 
substr($inputstr$posLeft$posRight $posLeft)
}

$MyString "dnkjsdhi4have4solved4the4puzzlejdkndsadsasdwqwio23912991233";

$doGet ucwords($rawr)
$rawr str_place("4",$blanket,$MyString)
$blanket $rawr;
$wristwatch " ";
echo 
$wristwatch;
die();
?>
1. You can only use the Variables and Functions in PHP and in the Script.

2. You can Add only 1 Variable.

3. Make it echo "I Have Solved The Puzzle" must be cAsE sEnSiTiVe

4. You cant "I Have Solved The Puzzle" anywhere else in the script.

5. You can move the lines around.


http://img32.imageshack.us/img32/5093/shadowtrollt.png

Last edited by Shadow; Tuesday, July 7th, 2009 at 04:18pm.
  
Reply With Quote
Old
  (#2)
Payton is Offline
Member
Payton is an unknown quantity at this point
 
Payton's Avatar
 
Posts: 281
Join Date: Jul 2008
Rep Power: 0
   
Default Tuesday, July 7th, 2009

Is this it?

PHP Code:
   <?php

function stribet($inputstr$delimiterLeft$delimiterRight){
  
$posLeft stripos($inputstr$delimiterLeft) + strlen($delimiterLeft);
  
$posRight stripos($inputstr$delimiterRight$posLeft);
  return 
substr($inputstr$posLeft$posRight $posLeft)
}

$MyString "dnkjsdhi4have4solved4the4puzzlejdkndsadsasdwqwio23912991233";

$doGet ucwords($rawr)
$rawr str_place("4",$blanket,$MyString)
$blanket $rawr;
$wristwatch "I Have Solved The Puzzle! ";
echo 
$wristwatch;
die();
?>



LARGE RED TEXT IS SUPER COOL NOW
  
Reply With Quote
Old
  (#3)
Billybob1234 is Offline
Super Moderator
Billybob1234 is a glorious beacon of light
 
Billybob1234's Avatar
 
Posts: 2,651
Join Date: Jan 2008
Location: Wisconsin
Age: 19
Rep Power: 25
  Send a message via AIM to Billybob1234 Send a message via MSN to Billybob1234 Send a message via Yahoo to Billybob1234 Send a message via Skype™ to Billybob1234 
Default Tuesday, July 7th, 2009

Quote:
Originally Posted by Payton View Post
Is this it?

PHP Code:
   <?php

function stribet($inputstr$delimiterLeft$delimiterRight){
  
$posLeft stripos($inputstr$delimiterLeft) + strlen($delimiterLeft);
  
$posRight stripos($inputstr$delimiterRight$posLeft);
  return 
substr($inputstr$posLeft$posRight $posLeft)
}

$MyString "dnkjsdhi4have4solved4the4puzzlejdkndsadsasdwqwio23912991233";

$doGet ucwords($rawr)
$rawr str_place("4",$blanket,$MyString)
$blanket $rawr;
$wristwatch "I Have Solved The Puzzle! ";
echo 
$wristwatch;
die();
?>
Read rule 4, you can't do that. I'm getting close to solving this one. It's hard.


http://img196.imageshack.us/img196/769/sig2i.png
  
Reply With Quote
Old
  (#4)
Payton is Offline
Member
Payton is an unknown quantity at this point
 
Payton's Avatar
 
Posts: 281
Join Date: Jul 2008
Rep Power: 0
   
Default Tuesday, July 7th, 2009

How about making $wristwatch echo a hash of the sentence?

PHP Code:
   <?php

function stribet($inputstr$delimiterLeft$delimiterRight){
  
$posLeft stripos($inputstr$delimiterLeft) + strlen($delimiterLeft);
  
$posRight stripos($inputstr$delimiterRight$posLeft);
  return 
substr($inputstr$posLeft$posRight $posLeft)
}

$MyString "dnkjsdhi4have4solved4the4puzzlejdkndsadsasdwqwio23912991233";

$doGet ucwords($rawr)
$rawr str_place("4",$blanket,$MyString)
$blanket $rawr;
$wristwatch "e6b7b4bdc4e3d2144bacfd706d9f414d  ";
echo 
$wristwatch;
die();
?>



LARGE RED TEXT IS SUPER COOL NOW
  
Reply With Quote
Old
  (#5)
Hu_ is Offline
Member
Hu_ is on a distinguished road
 
Posts: 61
Join Date: Mar 2009
Rep Power: 3
   
Default Tuesday, July 7th, 2009

That was easy, i hope you release more soon. Challenging but fun.

PHP Code:
   <?php



$MyString 
"dnkjsdhi4have4solved4the4puzzlejdkndsadsasdwqwio23912991233";

$doGet " ";
$From "4";
$blanket "i4have4solved4the4puzzle";
$rawr str_replace($From$doGet$blanket); 
$rawr ucwords($rawr);
$wristwatch "$rawr";
echo 
$wristwatch;
sleep(9999);



?>
1. You can only use the Variables and Functions in PHP and in the Script. <-I Used PHP functions

2. You can Add only 1 Variable. <- $From

3. Make it echo "I Have Solved The Puzzle" must be cAsE sEnSiTiVe <-Done

4. You cant "I Have Solved The Puzzle" anywhere else in the script. <- i4have4solved4the4puzzle <- Thats random characters to me.

5. You can move the lines around. <- Done

Last edited by Hu_; Tuesday, July 7th, 2009 at 07:15pm.
  
Reply With Quote
Old
  (#6)
Shadow is Offline
Member
Shadow is an unknown quantity at this point
 
Posts: 265
Join Date: May 2008
Rep Power: 0
   
Default Wednesday, July 8th, 2009

Quote:
Originally Posted by Hu Hu View Post
That was easy, i hope you release more soon. Challenging but fun.

PHP Code:
   <?php



$MyString 
"dnkjsdhi4have4solved4the4puzzlejdkndsadsasdwqwio23912991233";

$doGet " ";
$From "4";
$blanket "i4have4solved4the4puzzle";
$rawr str_replace($From$doGet$blanket); 
$rawr ucwords($rawr);
$wristwatch "$rawr";
echo 
$wristwatch;
sleep(9999);



?>
1. You can only use the Variables and Functions in PHP and in the Script. <-I Used PHP functions

2. You can Add only 1 Variable. <- $From

3. Make it echo "I Have Solved The Puzzle" must be cAsE sEnSiTiVe <-Done

4. You cant "I Have Solved The Puzzle" anywhere else in the script. <- i4have4solved4the4puzzle <- Thats random characters to me.

5. You can move the lines around. <- Done
YAY someone figured it out ;D


http://img32.imageshack.us/img32/5093/shadowtrollt.png
  
Reply With Quote
Old
  (#7)
Charlie_ is Offline
Member
Charlie_ is an unknown quantity at this point
 
Posts: 138
Join Date: Jan 2009
Rep Power: 0
   
Default Wednesday, July 8th, 2009

Quote:
Originally Posted by Shadow View Post
YAY someone figured it out ;D
Alternative answer: (I think you would have had a rule disallowing the string i4have4solved4the4puzzle anywhere else in the script than $MyString, If you had thought of Hu Hus answer?)
PHP Code:
<?php

function stribet($inputstr$delimiterLeft$delimiterRight) {
  
$posLeft stripos($inputstr$delimiterLeft) + strlen($delimiterLeft);
  
$posRight stripos($inputstr$delimiterRight$posLeft);
  return 
substr($inputstr$posLeft$posRight $posLeft);
}

$MyString "dnkjsdhi4have4solved4the4puzzlejdkndsadsasdwqwio23912991233";

$doGet " ";
$rawr str_replace("4"$doGet,$MyString);
$blanket stribet($rawr"nkjsdh""jdkndsadsasdwqwio23912991233");
$wristwatch ucwords($blanket);
echo 
$wristwatch;
die();
?>
  
Reply With Quote
Old
  (#8)
Hu_ is Offline
Member
Hu_ is on a distinguished road
 
Posts: 61
Join Date: Mar 2009
Rep Power: 3
   
Default Wednesday, July 8th, 2009

Quote:
Originally Posted by Charlie_ View Post
Alternative answer: (I think you would have had a rule disallowing the string i4have4solved4the4puzzle anywhere else in the script than $MyString, If you had thought of Hu Hus answer?)
Code:
if (i4have4solved4the4puzzle != I Have Solved The Puzzle){
cout << "Hu Was right, but on the otherhand charles's script was was to."; 
}
else
{ 
  cout << "Well it isnt the same is it? Anyway Charles + Hu are the winners";
}
  
Reply With Quote
Old
  (#9)
Charlie_ is Offline
Member
Charlie_ is an unknown quantity at this point
 
Posts: 138
Join Date: Jan 2009
Rep Power: 0
   
Default Thursday, July 9th, 2009

Quote:
Originally Posted by Hu Hu View Post
Code:
if (i4have4solved4the4puzzle != I Have Solved The Puzzle){
cout << "Hu Was right, but on the otherhand charles's script was was to."; 
}
else
{ 
  cout << "Well it isnt the same is it? Anyway Charles + Hu are the winners";
}
Syntax Error: Automatically corrected to:
Code:
if ("i4have4solved4the4puzzle" != "I Have Solved The Puzzle"){
cout << "Hu Was right, but on the otherhand charles's script was was to."; 
}
else
{ 
  cout << "Well it isnt the same is it? Anyway Charles + Hu are the winners";
}
by the Charlie_ C++ Compiler
  
Reply With Quote
Reply

Lower Navigation
Go Back   ClubPenguinHQ Forums > General Discussion > Programming > PHP

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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

BB 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
php challenge Billybob1234 PHP 15 Tuesday, July 7th, 2009 07:28pm
[ClubPenguin.com] Wig Challenge RSSbot Club Penguin Blogs 0 Wednesday, April 29th, 2009 02:12pm
challenge meh! darthmaul General Chat 2 Sunday, March 22nd, 2009 06:46pm
Impossible arrow tap challenge. scar 444 General Chat 8 Sunday, October 5th, 2008 12:06pm
Challenge - make your trainer compatible with Ubuntu Vinni3 Macroing & Cheating 5 Monday, June 9th, 2008 05:42pm



Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0
vBulletin Skin developed by: vBStyles.com
Copyright ©2006 - 2009, RancidKraut Industries