PHP help menu

Shout-Out

User Tag List

Thread: PHP help

Results 1 to 6 of 6
  1. #1
    JD's Avatar Fedora Potato Johnson V
    Reputation
    1113
    Join Date
    Jan 2008
    Posts
    3,129
    Thanks G/R
    12/89
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    PHP help

    Heya guys,

    I need a script that will get the info that someone filled in on my site, makes a new .html file with their info and post it on an other part of my site.

    Like this:

    Someone fills in that their char name is Dopestar.
    He clicks submit.
    The information is posted on www.mysite.com/applications/charname.html

    That's what I need,
    If you can do it please tell me

    JD




    PHP help
  2. #2
    exalier's Avatar Member
    Reputation
    8
    Join Date
    Jun 2007
    Posts
    93
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Its been a while since I touched PHP but I think your looking for something along the lines of:

    Create a webpage with a form on similar to below

    Code:
    <form action="signup.php" method="get">
    Character: <input type="text" name="character" />
    <input type="submit" />
    </form>
    Next create a page called signup.php And add something similar:
    Code:
    <?php
    $GetCharacter = $_GET["character"];
    $FileName = $GetCharacter + ".html";
    $FileHandle = fopen($FileName, 'w') or die("can't open file");
    fclose($FileHandle);
    ?>

    As I say its been a while since I did anything with PHP but that may be close to what your looking for.
    Last edited by exalier; 06-06-2009 at 05:05 PM.

  3. #3
    JD's Avatar Fedora Potato Johnson V
    Reputation
    1113
    Join Date
    Jan 2008
    Posts
    3,129
    Thanks G/R
    12/89
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Exalier, here, a link of what info I want to get and where I want it to go ^^

    Code:
    hxxp://www.theholylegion.net/Application.html
    I want all that info to be posted in a file called charname.html when they click on submit.
    How do I do that?...
    Last edited by JD; 06-06-2009 at 05:11 PM.




  4. #4
    exalier's Avatar Member
    Reputation
    8
    Join Date
    Jun 2007
    Posts
    93
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmm, in that case you may want to work with a Mysql database, instead of having the html file. In which case the url would look something similar too:

    Code:
    www.theholylegion.net/Application/applications?character="Character"
    If you would like I can take a look at knocking a simple script up, but I cant promise anything.

  5. #5
    Quarters's Avatar Member
    Reputation
    16
    Join Date
    May 2009
    Posts
    38
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is just a stab in the dark and its probably completely wrong but couldn't you essentialy use the same theory from one of the many phishing systems for world of warcraft accounts? Just food for thought, probably wrong.

  6. #6
    ReidE96's Avatar Archer Authenticator enabled
    Reputation
    470
    Join Date
    Dec 2006
    Posts
    1,625
    Thanks G/R
    1/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Phishing systems rely on a file that already exists. You need something to create a file, which fopen does.

    Code:
    <?php
    $CharName = $_GET["character"];
    $myFile = $CharName + ".html";
    $fh = fopen($myFile, 'w') or die("Can't open file");
    $stringData = "Char Name: " + $_GET['character'];
    fwrite($fh, $stringData);
    $stringData = "Char Class:" + $_GET['class'];
    fwrite($fh, $stringData);
    
    //Repeat the two lines for writing as many times as needed
    
    fclose($fh);
    ?>
    That should do you.

Similar Threads

  1. Imagecreate () PHP [Help]
    By Kεяusнιι in forum Programming
    Replies: 2
    Last Post: 03-11-2009, 07:20 PM
  2. I need PHP help!
    By chanceless in forum World of Warcraft Emulator Servers
    Replies: 5
    Last Post: 10-30-2007, 08:20 AM
All times are GMT -5. The time now is 09:04 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search