Jump to content

ZachMEdwards

Members
  • Posts

    95
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

ZachMEdwards's Achievements

Member

Member (2/5)

0

Reputation

  1. How can I check?
  2. The shell_exec line is not executing "flare". I believe there is something wrong with the path
  3. I am using shared hosting at HostGator. I am trying to execute flare (a command line actionscript decompiler) via PHP. According to phpinfo() my System is Linux gator1854.hostgator.com 3.2.13 #4 SMP Thu Mar 29 19:22:42 CDT 2012 x86_64 In my public_html, I have a folder named "zachafer" and inside that folder, I have a folder named "flare". Inside the flare folder, I have the flare command line version, named "flare" and a file named movie.swf. The flare website says that I need to run "./flare somepath/somename.swf" Here is my code: <?PHP error_reporting(-1); $swf = 'movie'; chdir("/home/infamous/public_html/zachafer/flare"); $cmd = "./flare $swf.swf"; shell_exec($cmd); echo "Cmd: $cmd\n"; echo "File: ".file_get_contents("$swf.flr"); ?> Thank you.
  4. Hey guys, I've been running PHP on my computer and running scripts through FireFox via localhost. I want to try PHP CGI. I don't know how to run scripts that I've made (even a simple hello world) and I would like to see a sample script that prompts the user for their "Username" and their "Password" and then checks if both are != "" Thanks, Zach
  5. Here's your Javascript pattern in PHP: '#^https?\:\/\/(www\d?\d?\d?\d?\.)?([A-Za-z0-9-_]+\.)?[A-Za-z0-9-_]+((\.[A-Za-z]{2,6})(\.[A-Za-z]{2})?([0-9-_%&\?\/\.=]*))$#'
  6. file_get_contents echo file_get_contents($_POST['id'].'.txt');
  7. What format do you want your serial number to be in? rand()
  8. Have your checkboxes named to an array, like so: <input type=checkbox name=box[] value='1'> And your PHP code should look like: $box=$_POST['box']; while (list ($key,$val) = @each ($box)) echo "www.link.com/".$val.".php";
  9. My (nerd) friend presented me this puzzle today: There are 4 people on 2 sides of a room, with 1 empty spot in the middle (looks like AAAA_BBBB). Your ending goal is to reverse the starting order. So the solution is BBBB_AAAA. Here are the valid moves: Advance: Person moves into blank tile. (AAAA_BBBB -> AAA_ABBBB) Pass: Person hops around another person of opposite type into blank tile. (AAA_ABBBB -> AAABA_BBB) I've been at this for a good time and I still can't figure it out. I mean I guess I could hard write a solution but that'd be for a fixed amount (4 A's and 4 B's). I was think recursion but I'm not sure... Needing help ASAP in order to get my free lunch tomorrow!
  10. I don't really understand the question, but is this what you are looking for? $pattern = '%/^(.*)$/%m';
  11. Nevermind, I used fsockopen
  12. Hey guys! I am writing a class file that does this: sends a GET/POST request with headers to a page and returns the HTML stores cookies Uses GZIp decompression I was wondering: what is the difference between fsockopen and curl? Which is faster for completing those tasks? Thanks
  13. Hey guys! I found a flush function and it seems to be working well, but sometimes it will cut off characters. It's very strange. Here's my flush function: function out($str) { echo $str."<br />\n"; vbflush(); } function vbflush() { if (ob_get_length()){ @ob_flush(); @flush(); @ob_end_flush(); } @ob_start(); } And I'm calling it like this: out('Waiting 30 seconds until execution'); And this is my output: Waiting 30 seconds until executio Anyone know why?
  14. Nevermind, it was an entry error in my list.
  15. Perfect! I had all that changed but the second one. Thanks a ton, you guys are genius.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.