www.webdeveloper.com
Page 1 of 2 12 LastLast
Results 1 to 15 of 20

Thread: php execute

Hybrid View

  1. #1
    Join Date
    Nov 2012
    Posts
    10

    php execute

    Hello, there is a multiplayer game that i Play called Zwinky and i as i said it's similar to Habbo hotel, Club pengiun.
    Now, obviously it has a stores to buy items and stuff and it's expensive.

    i know how to make it free, but there is one and only problem.

    i'm not that experienced with php, there is an XML files that should be edited:

    1. 9.xml which is the main store file that has all the items in it and that's where the Prices should be changed.

    2. Purchase.xml which is everything in your wardrobe that you Bought and every new item you purchase goes immediately there.

    3. I've downloaded their items which is (SWF Files) so it's like i have their stores locally in my host.

    Now what i'm planning to do is editing the 9.xml and setting all the items to free, then uploading the 9.xml file to my own website but there is only one thing left that some peoples told me it can be done with php.

    I need a php script or something that for example if i click "Add" a specific item to my Purchase.xml it automatically makes the changes in the game's real website and not locally.

    i'm not really experienced with php but i had a developer who made my loginform connect with their database so that peoples can't login randomly to my site. it has to be their real game accounts.

    this is What he used:
    $h = array(
    'method' => 'POST',
    'header' => 'Content-type: application/x-www-form-urlencoded'
    );

    $fields_string = "";

    foreach($fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; }
    rtrim($fields_string, '&');

    $a = cURL("http://registration....jax.jhtml",true, null, $fields_string, $h);
    $line = getLastLines($a, 1);
    if(strstr($a, "user_info"))
    {
    return true;
    }
    else
    {
    return false;
    }

    Now i want to use the same method like connecting my website with the games wardrobes so that i can make any changes to my in-game wardrobe through my website, there was a guy who made a site where you login and purchase everything in the game for free through his site, that's why I believe it's possible.

    1. The game's store link is: http://www.zwinky.com/zwinky-world/c...othing/923.xml

    2. i'm gonna edit the 923.xml so i can change the prices and make them 0 so from My website it's gonna be Mysite.com/zwinky-world/catalog/clothing/923.xml

    3. http://www.zwinky.com/zwinky-world/Checkout.jhtml < this is the link you get Once you purchase an item.

    4. and it goes to http://outfits.zwinky.com/users/126/.../purchased.xml < after the Checkout..purchased.xml shows Everything you have purchased in your wardrobe.

    Any suggestions? Some peoples said form action and some other people said Q parameter, sending a request by AJAX script or something..

  2. #2
    Join Date
    Dec 2012
    Posts
    19
    Very smart all you need now is to write the php code may i ask what part of the code are you at XD?

  3. #3
    Join Date
    Nov 2012
    Posts
    10
    oh actually, i'm not the one who's coding it's my friend shes been helping me lately but then she become inactive and i'm stuck in this part:

    Code:
    <?php
    
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, "http://www.zwinky.com/zwinky-world/Checkout.jhtml");
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_POST, true);
    curl_setopt($ch, CURLOPT_TIMEOUT, 5);
    curl_setopt($ch, CURLOPT_USERAGENT, "MozillaXYZ/1.0");
    //items Array
    $data = array(
        'storeId'	=> '%5B26%5D',
        'items'		=> '%5B%5B%7Bid%3A20036352%2Cspecies%3Ababe%2Cc%3A%220xffffff%22%7D%5D%5D',
        'pType'		=> '%5B0%5D'
    );
    $cookies = array(
    //Purchase cookie Goes here
    	'anx'		=> ''
    );
    
    curl_setopt ($ch, CURLOPT_COOKIE,
    //DIRTYCOOKIES GOES HERE 
    ""
     
    
    curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
    $output = curl_exec($ch);
    curl_close($ch);
    $xml = simplexml_load_string($output);
    print_r($xml,1);
    echo("done\n");
    echo($output);
    ?>
    You think you can provide help with it?

  4. #4
    Join Date
    Dec 2012
    Posts
    19
    And further more i noticed we wont be able to see into the store xml unless we play zwinky and are currently logged in so maybe an example of the xml file would make people understand this thread more and what your aiming at.

  5. #5
    Join Date
    Nov 2012
    Posts
    10
    Quote Originally Posted by jakemadness View Post
    And further more i noticed we wont be able to see into the store xml unless we play zwinky and are currently logged in so maybe an example of the xml file would make people understand this thread more and what your aiming at.
    like a screenshot or what?

  6. #6
    Join Date
    Dec 2012
    Posts
    19
    well that could help or just a small taster of the xml file itself

  7. #7
    Join Date
    Nov 2012
    Posts
    10
    Code:
    <store id="923" name="The Mix">
    <species name="stud">
    <Miscellanies baseurl="stud/misc/01/" name="Miscellaneous" sc="1" sv="1" v="1" z="46000">
    <x c="0xcccccc" c2="0x666666" category="Miscellanies" id="20038843" n="Boombox HB" pb="150" sc="1" species="stud" u="MXmis21"/>
    <x c="0xb991db" c2="0xf4baae" category="Miscellanies" creator="0" id="20075506" n="OctoBuddy" pb="500" sc="1" species="stud" u="MXmis39" z="46000"/>
    <x c="0xe50031" category="Miscellanies" creator="0" id="20075507" n="Crabby Pal" pb="300" sc="1" species="stud" u="MXmis38"/>
    <x c="0xff931e" category="Miscellanies" creator="0" id="20075508" n="Sea Staff" pb="160" sc="1" species="stud" u="MXmis37"/>
    <x c="0x981107" c2="0xf8f7e0" category="Miscellanies" id="20039488" n="Rocker Guitar" pb="180" sc="1" species="stud" u="MXmis24" z="46000"/>
    <x c="0x1a1a1a" category="Miscellanies" id="20039363" n="Rocker Microphone" pb="55" sc="1" species="stud" u="MXmis23" z="46000"/>
    <x c="0xf1f1f1" category="Miscellanies" id="20039489" n="Star Guitar" pb="170" sc="1" species="stud" u="MXmis25" z="46000"/>
    </Miscellanies>
    <Hats baseurl="stud/hats/01/" name="Hats" sc="1" z="40000">
    <x c="0x66ff66" c2="0x000000" category="Hats" id="20038844" n="80s hat" pb="70" sc="1" species="stud" u="MXhat5"/>
    </Hats>
    <Bottoms baseurl="stud/bottoms/01/" name="Bottoms" sc="1" z="20000">
    <x c="0x86a7d7" c2="0xffffff" category="Bottoms" id="20038845" n="80s Jeans" pb="95" sc="1" species="stud" u="MXbm7"/>
    <x c="0xebc11d" category="Bottoms" id="20040128" n="Disco pants " pb="90" sc="1" species="stud" u="MXbm21"/>
    <x c="0x2c2c35" c2="0xffffff" category="Bottoms" creator="0" id="20088218" n="Splatter Skinnies" pb="100" sc="1" species="stud" u="MXbm35"/>
    <x c="0x222526" category="Bottoms" creator="0" id="20088213" n="Square Slax" pb="100" sc="1" species="stud" u="MXbm37"/>
    <x c="0x666666" category="Bottoms" creator="0" id="20088212" n="Camo Skinnies" pb="110" sc="1" species="stud" u="MXbm36"/>
    <x c="0x333333" category="Bottoms" id="20039365" n="Rocker Pants" pb="90" sc="1" species="stud" u="MXbm13"/>
    </Bottoms>
    <Glasses baseurl="stud/glasses/01/" name="Glasses" sc="0" z="36000">
    <x c="0xffff00" category="Glasses" id="20038883" n="80s Glasses HB" pb="140" sc="1" species="stud" u="MXgla3"/>
    <x c="0x1a1a1a" category="Glasses" creator="0" id="20088214" n="Scene Spex" pb="50" sc="1" species="stud" u="MXgla9" z="36575"/>
    </Glasses>
    <Shirts baseurl="stud/tops/01/" name="Shirts" sc="1" z="21000">
    <x c="0xff0000" c2="0x00cccc" category="Shirts" id="20038839" n="80s top" pb="140" sc="1" species="stud" u="MXtop9"/>
    <x c="0x3333cc" c2="0xffff33" category="Shirts" id="20040131" n="Disco top" pb="90" sc="1" species="stud" u="MXtop27"/>
    <x c="0x666666" c2="0x1a1a1a" category="Shirts" creator="0" id="20088220" n="Scene Stripes" pb="125" sc="1" species="stud" u="MXtop50"/>
    <x c="0x1a1a1a" c2="0xf2f2f2" category="Shirts" creator="0" id="20088210" n="Scene Skull" p="1000" sc="1" species="stud" u="MXtop49"/>
    <x c="0x1a1a1a" c2="0xe6e6e6" category="Shirts" id="20039362" n="Rock Star Tee" pb="50" sc="1" species="stud" u="MXtop18"/>
    <x c="0xefdd03" c2="0x1a1a1a" category="Shirts" id="20039364" n="Lightning Tank" pb="85" sc="1" species="stud" u="MXtop16"/>
    <x c="0xe6e6e6" c2="0x262626" category="Shirts" id="20039369" n="Zebra Rock Tank" pb="90" sc="1" species="stud" u="MXtop17"/>
    there

  8. #8
    Join Date
    Dec 2012
    Posts
    19
    I f you provided these "important" highlights sooner you might of had a finished product by now, like if you post a thread the people on this site are going to need sample code of the xml php and w/e is needed to make the finished product.

  9. #9
    Join Date
    Nov 2012
    Posts
    10
    well that's all I can provide for now i cannot reach contact with my friend so i am not sure if she finished the code or is it still missing something but well its a web developers community so you guys supposed to be able to provide some help

  10. #10
    Join Date
    Dec 2012
    Posts
    19
    I suggest you look closer to the u="" rather then anything else and the image locations themselves and maybe replace with a new image on the games server rather then using the cURL function.

  11. #11
    Join Date
    Nov 2012
    Posts
    10
    well i got some peoples who tried to help me but they all give me a urls that does not work or maybe i dont know how to work with them correctly
    1.
    Code:
    http://www.zwinky.com/zwinky-world/Checkout.jhtml?items=[[{id:20017419,at:free,species:stud,c:%220x996600%22,z:0,url=%22http://assets.zwinky.com/assets3/stud/express/01/ex10.1.swf?v=1
    %22}]]&storeId=[0]&pType=[0]
    2.
    Code:
    http://www.zwinky.com/zwinky-world/Checkout.jhtml?items=[[{id:20017613,species:stud,z:0,url="http://assets.zwinky.com/assets3/fds/templates/stud/misc/3.swf"}]]&storeId=[0]&pType=[0]
    3.
    Code:
    http://www.zwinky.com/zwinky-world/Checkout.jhtml?items=[[{id:20016301,species:babe,z:0,url="http://assets.zwinky.com/assets3/store/zwinky/babe/misc/01/WTmis1.swf"}]]&storeId=[0]&pType=[0]
    4.
    Code:
    http://www.zwinky.com/zwinky-world/Checkout.jhtml?creator=1&storeId=[12][[{id:20093124,species:babe,at:keepsake}]]&storeId=[0]&pType=[0]
    5.
    Code:
    http://www.zwinky.com/zwinky-world/Checkout.jhtml?items=[[{id:20093071,at:free,species:male,c:%220x996600%22,z:0,name:Xmas%20Whatever,v=1%20%22"}]]%20&storeId=[12]&pType=[0]
    6.
    Code:
    [{id:20093218,species:stud,at:keepsake}],[{id:20093071,species:stud,at:keepsake}],[{id:20093217,species:stud,at:keepsake}],[{id:20093078,species:stud,at:keepsake}],[{id:20093085,species:stud,at:keepsake}],[{id:20093104,species:stud,at:keepsake}],[{id:20093129,species:stud,at:keepsake}],[{id:20093116,species:stud,at:keepsake}],[{id:20093072,species:stud,at:keepsake}],[{id:20092629,species:stud,at:keepsake}], [{id:20092625,species:stud,at:keepsake}],[{id:20092611,species:stud,at:keepsake}],[{id:20092597,species:stud,at:keepsake}],[{id:20092583,species:stud,at:keepsake}],[{id:20092579,species:stud,at:keepsake}],[{id:20092575,species:stud,at:keepsake}],[{id:20092571,species:stud,at:keepsake}],[{id:20092567,species:stud,at:keepsake}],[{id:20092563,species:stud,at:keepsake}],[{id:20092558,species:stud,at:keepsake}], [{id:20092554,species:stud,at:keepsake}],[{id:20092533,species:stud,at:keepsake}],[{id:20073500,species:stud,at:keepsake}],[{id:20073575,species:stud,at:keepsake}],[{id:20073572,species:stud,at:keepsake}],[{id:20073405,species:stud,at:keepsake}],[{id:20073289,species:stud,at:keepsake}],[{id:20073363,species:stud,at:keepsake}],[{id:20073434,species:stud,at:keepsake}],[{id:20073437,species:stud,at:keepsake}], [{id:20073586,species:stud,at:keepsake}],[{id:20017893,species:stud,at:keepsake}],[{id:20093216,species:stud,at:keepsake}],[{id:20093065,species:stud,at:keepsake}],[{id:20093083,species:stud,at:keepsake}],[{id:20093097,species:stud,at:keepsake}],[{id:20093115,species:stud,at:keepsake}],[{id:20092531,species:stud,at:keepsake}],[{id:20073587,species:stud,at:keepsake}],[{id:20017874,species:stud,at:keepsake}] [{id:20093215,species:stud,at:keepsake}],[{id:20093089,species:stud,at:keepsake}],[{id:20092532,species:stud,at:keepsake}],[{id:20073440,species:stud,at:keepsake}],[{id:20073581,species:stud,at:keepsake}],[{id:20073590,species:stud,at:keepsake}],[{id:20017858,species:stud,at:keepsake}],[{id:20017859,species:stud,at:keepsake}],[{id:20017860,species:stud,at:keepsake}],[{id:20017861,species:stud,at:keepsake}], [{id:20017862,species:stud,at:keepsake}],[{id:20017863,species:stud,at:keepsake}],[{id:20017864,species:stud,at:keepsake}],[{id:20017865,species:stud,at:keepsake}],[{id:20017866,species:stud,at:keepsake}],[{id:20017867,species:stud,at:keepsake}],[{id:20017868,species:stud,at:keepsake}],[{id:20017869,species:stud,at:keepsake}],[{id:20017870,species:stud,at:keepsake}],[{id:20017871,species:stud,at:keepsake}], [{id:20017872,species:stud,at:keepsake}],[{id:20017873,species:stud,at:keepsake}],[{id:20093212,species:stud,at:keepsake}],[{id:20093064,species:stud,at:keepsake}],[{id:20093081,species:stud,at:keepsake}],[{id:20093107,species:stud,at:keepsake}],[{id:20093066,species:stud,at:keepsake}],[{id:20092530,species:stud,at:keepsake}],[{id:20073361,species:stud,at:keepsake}],[{id:20073583,species:stud,at:keepsake}], [{id:20073593,species:stud,at:keepsake}],[{id:20017856,species:stud,at:keepsake}],[{id:20093068,species:stud,at:keepsake}],[{id:20093098,species:stud,at:keepsake}],[{id:20073029,species:stud,at:keepsake}],[{id:20073588,species:stud,at:keepsake}],[{id:20073592,species:stud,at:keepsake}],[{id:20017851,species:stud,at:keepsake}],[{id:20017852,species:stud,at:keepsake}],[{id:20017853,species:stud,at:keepsake}], [{id:20017854,species:stud,at:keepsake}],[{id:20017855,species:stud,at:keepsake}],[{id:20093069,species:stud,at:keepsake}],[{id:20093119,species:stud,at:keepsake}],[{id:20093117,species:stud,at:keepsake}],[{id:20093113,species:stud,at:keepsake}],[{id:20073290,species:stud,at:keepsake}],[{id:20073291,species:stud,at:keepsake}],[{id:20073030,species:stud,at:keepsake}],[{id:20073450,species:stud,at:keepsake}], [{id:20073589,species:stud,at:keepsake}],[{id:20073596,species:stud,at:keepsake}],[{id:20073026,species:stud,at:keepsake}],[{id:20073031,species:stud,at:keepsake}],[{id:20017849,species:stud,at:keepsake}],[{id:20017850,species:stud,at:keepsake}],[{id:20093074,species:stud,at:keepsake}],[{id:20093075,species:stud,at:keepsake}],[{id:20093087,species:stud,at:keepsake}],[{id:20093102,species:stud,at:keepsake}], [{id:20093127,species:stud,at:keepsake}],[{id:20093118,species:stud,at:keepsake}],[{id:20093114,species:stud,at:keepsake}],[{id:20073364,species:stud,at:keepsake}],[{id:20073027,species:stud,at:keepsake}],[{id:20073585,species:stud,at:keepsake}],[{id:20017879,species:stud,at:keepsake}],[{id:20017880,species:stud,at:keepsake}],[{id:20017881,species:stud,at:keepsake}],[{id:20017882,species:stud,at:keepsake}], [{id:20017883,species:stud,at:keepsake}],[{id:20093077,species:stud,at:keepsake}],[{id:20093101,species:stud,at:keepsake}],[{id:20093120,species:stud,at:keepsake}],[{id:20093070,species:stud,at:keepsake}],[{id:20073360,species:stud,at:keepsake}],[{id:20073032,species:stud,at:keepsake}],[{id:20073594,species:stud,at:keepsake}],[{id:20073598,species:stud,at:keepsake}],[{id:20017875,species:stud,at:keepsake}], [{id:20017876,species:stud,at:keepsake}],[{id:20017877,species:stud,at:keepsake}],[{id:20017878,species:stud,at:keepsake}],[{id:20093094,species:stud,at:keepsake}],[{id:20093112,species:stud,at:keepsake}],[{id:20073362,species:stud,at:keepsake}],[{id:20073448,species:stud,at:keepsake}],[{id:20073584,species:stud,at:keepsake}],[{id:20073591,species:stud,at:keepsake}],[{id:20073597,species:stud,at:keepsake}], [{id:20073033,species:stud,at:keepsake}],[{id:20017884,species:stud,at:keepsake}],[{id:20017885,species:stud,at:keepsake}],[{id:20017886,species:stud,at:keepsake}],[{id:20017887,species:stud,at:keepsake}],[{id:20017888,species:stud,at:keepsake}],[{id:20017889,species:stud,at:keepsake}],[{id:20017890,species:stud,at:keepsake}],[{id:20017891,species:stud,at:keepsake}],[{id:20093067,species:stud,at:keepsake}], [{id:20017857,species:stud,at:keepsake}],[{id:20073595,species:stud,at:keepsake}],
    7.
    Code:
    http://www.zwinky.com/zwinky-world/Checkout.jhtml?items=[[{id:20093071,at:free,species:male,c:%220x996600%22,z:0,v=1 %22}]] &storeId=[12]&pType=[0]

  12. #12
    Join Date
    Dec 2012
    Posts
    19
    You might not be entering the url in the proper format for there system to recognize thats why it probable doesn't work im guessing you want the finished product to look something like this http://zwiinky.info/img/example.tiff i suggest building a normal item purchase cart and build on it.

  13. #13
    Join Date
    Dec 2012
    Posts
    19
    I just think you are jumping in without checking easier solutions first i think you are correct about ripping there xml data and i think you are right about downloading there swf files i just don't think the Curl is needed for what you are trying to accomplish and maybe try adding your own u="" to the ripped xml data.

  14. #14
    Join Date
    Nov 2012
    Posts
    10
    Quote Originally Posted by jakemadness View Post
    I just think you are jumping in without checking easier solutions first i think you are correct about ripping there xml data and i think you are right about downloading there swf files i just don't think the Curl is needed for what you are trying to accomplish and maybe try adding your own u="" to the ripped xml data.
    already worked on but it gives error validating clothes in wardrobe

    and yeah your purchase card is exactly what i been trying to do but dont u think i need the same method still in order to build a shopping card?

  15. #15
    Join Date
    Dec 2012
    Posts
    19
    Not necessary because there is always more then one hole in game store purchase methods, You just need to look deep enough to find them and i know there will be more then one way to get items from this games stores, Its just knowing what your looking for build your shopping cart form then the script behind it to purchase normally and then try building on it until you find a hole but you will at some point need to build the cart to get the items, You should build it first fully functional like the game cart works then look deeper.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles