/    Sign up×
Community /Pin to ProfileBookmark

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: [url]http://www.zwinky.com/zwinky-world/catalog/clothing/923.xml[/url]

  • 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.

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

  • 4.

    and it goes to [url]http://outfits.zwinky.com/users/126/13/princessbloomy/purchased.xml[/url] < 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..

    to post a comment
    PHP

    19 Comments(s)

    Copy linkTweet thisAlerts:
    @jakemadnessDec 14.2012 — Very smart all you need now is to write the php code may i ask what part of the code are you at XD?
    Copy linkTweet thisAlerts:
    @KeyTrixauthorDec 14.2012 — 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("donen");
    echo($output);
    ?>[/CODE]


    You think you can provide help with it?
    Copy linkTweet thisAlerts:
    @jakemadnessDec 14.2012 — 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.
    Copy linkTweet thisAlerts:
    @KeyTrixauthorDec 14.2012 — 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.[/QUOTE]
    like a screenshot or what?
    Copy linkTweet thisAlerts:
    @jakemadnessDec 14.2012 — well that could help or just a small taster of the xml file itself
    Copy linkTweet thisAlerts:
    @KeyTrixauthorDec 14.2012 — [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"/>
    [/CODE]

    there
    Copy linkTweet thisAlerts:
    @jakemadnessDec 14.2012 — I f you provided these "[COLOR="#FF0000"]important[/COLOR]" 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.
    Copy linkTweet thisAlerts:
    @KeyTrixauthorDec 14.2012 — 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
    Copy linkTweet thisAlerts:
    @jakemadnessDec 14.2012 — 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.
    Copy linkTweet thisAlerts:
    @KeyTrixauthorDec 14.2012 — 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]
    [/CODE]

    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]
    [/CODE]

    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]
    [/CODE]

    4.
    [CODE]
    http://www.zwinky.com/zwinky-world/Checkout.jhtml?creator=1&storeId=[12][[{id:20093124,species:babe,at:keepsake}]]&storeId=[0]&pType=[0]
    [/CODE]

    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]
    [/CODE]

    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}],
    [/CODE]

    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]
    [/CODE]
    Copy linkTweet thisAlerts:
    @jakemadnessDec 14.2012 — 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.
    Copy linkTweet thisAlerts:
    @jakemadnessDec 14.2012 — 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.
    Copy linkTweet thisAlerts:
    @KeyTrixauthorDec 14.2012 — 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.[/QUOTE]

    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?
    Copy linkTweet thisAlerts:
    @jakemadnessDec 14.2012 — 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.
    Copy linkTweet thisAlerts:
    @KeyTrixauthorDec 14.2012 — 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.[/QUOTE]

    I can build a shopping cart but i dont think i can make it connected with zwinky's store because i will need their .sql database then
    Copy linkTweet thisAlerts:
    @jakemadnessDec 15.2012 — And further more what i meant by [COLOR="#FF0000"]You might not be entering the url in the proper format for there system to recognize [/COLOR] is were u place the u="" in the link maybe you don't need a full url like maybe use u="../../../misc/01/HWmis1.swf" and mess with the image path to replace apart of the full image in ur purchase xml.
    Copy linkTweet thisAlerts:
    @jakemadnessDec 15.2012 — Like i say i think you are correct with ripping there store xml files and placing them on your server and editing them on your server but i would be focusing on the image path rather than anything else.
    Copy linkTweet thisAlerts:
    @KeyTrixauthorDec 15.2012 — Like i say i think you are correct with ripping there store xml files and placing them on your server and editing them on your server but i would be focusing on the image path rather than anything else.[/QUOTE]

    What do you mean image path give me a full link to mess with
    Copy linkTweet thisAlerts:
    @KeyTrixauthorDec 15.2012 — I tried this
    [CODE]http://www.zwinky.com/zwinky-world/Checkout.jhtml?items=[[{id:20017218,species:stud,z:21000,name:test,u="assets3/store/zwinky/stud/jackets/01/MXjt7.swf"}]]&storeId=[0]&pType=[0][/CODE]

    it works without error validating but it still shows the normal "layered shirt" not the MXjt7.swf

    any ideas?

    and this:
    [CODE]http://www.zwinky.com/zwinky-world/Checkout.jhtml?items=[[{id:20017218,species:stud,z:21000,name:test,url="http://assets.zwinky.com/assets3/store/zwinky/stud/jackets/01/MXjt7.swf"}]]&storeId=[0]&pType=[0][/CODE]

    doesnt work it gives error validating
    ×

    Success!

    Help @KeyTrix spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 6.16,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @nearjob,
    tipped: article
    amount: 1000 SATS,

    tipper: @meenaratha,
    tipped: article
    amount: 1000 SATS,

    tipper: @meenaratha,
    tipped: article
    amount: 1000 SATS,
    )...