Jump to content
RealModScene

rileyil77

Members
  • Content Count

    7
  • Joined

  • Last visited

Posts posted by rileyil77


  1. On 2/11/2018 at 12:52 PM, Gualdimar said:

    rileyil77check the original script once again. there are two types of queries: by titleid and by name. 

    if the game has tilteid, fsd will get covers with it:

    
    if($_GET['query'] == "TitleID")

    if there is no titleid, fsd will try to get covers with the game`s name:

    
    elseif($_GET['query'] == "SearchTerm")

    no loops, just conditions

    yes, some parts of the code are repeated and it can be rewritten with functions, buuuuut i don`t have inspiration to do this

    You know what, I did go over the original script and you are correct.  I don't think Jay realized this when he was helping me.

    Again I got it working.  If had not been for your script, I would have never got it working to begin with.  So thank again.


  2. Gualdimar, thanks again for such a wonderful script.  A good friend of mine fixed my problem.  So, I'll explain why I was having issues.  Because of my Telnet Server I need a 32 Bit version of Windows, so my entire machine runs on Windows 10 Professional 32 Bit.  So, he writes PHP scripts and XML files all day for work on both Unix/Linux and Windows servers.  First he updated covers.php, because it double looping when connecting to XboxUnity.net.  I'll let him explain this through a FaceBook Messenger PM.

    From my friend, Jay, from our PM message off FaceBook:

    It looked like the PHP code of lines 24-31 was totally repeated.
    I had to update it, it was missing an end bracket after the options, 
    or I accidently erased it, it could have most likely been the later 
    PHP newer than 5.4 should be okay using this script.  You're running
    Apache/2.4.27 (Win32) PHP/5.6.31 Server on the machine.  So I have
    safetly deleted lines 43-51 in the cover.php.  Otherwise it would
    read the xml twice when looking up covers on XBoxUnity.net.
    You can see where the code is repeated, by looking at the original covers.php.

     

    Here is the cleaned up covers.php

    <?php
    $titleid=strtoupper($_GET['id']);
    if($_GET['query'] == "TitleID")
    {
        if (file_exists('covers/'.$titleid.".xml"))
        {
            include('covers/'.$titleid.".xml");
        }
        else
        {
            $ch = curl_init();
            $options = [
                CURLOPT_SSL_VERIFYPEER => false,
                CURLOPT_RETURNTRANSFER => true,
                CURLOPT_URL            => 'http://xboxunity.net/api/Covers/'.$titleid
              ];
        curl_setopt_array($ch, $options);
        $data = json_decode(curl_exec($ch));
        curl_close($ch);
        
        cover($data);
    }
    }

    function cover($data)
    {
        $xml = new SimpleXMLElement('<?xml version="1.0" encoding="ISO-8859-1"?>'.'<covers/>');
            
        if(count($data)>0)
        {
            foreach ($data as &$value) {        
                $title = $xml->addChild('title');
                $title->addAttribute('id',$value->titleid);
                $title->addAttribute('name',$value->name);
                $title->addAttribute('mediaid','');
                $title->addAttribute('filename','Cover.png');
                $title->addAttribute('type','');
                $title->addAttribute('mainlink',$value->url);
                $title->addAttribute('front',$value->front);
                $title->addAttribute('Official',(int)$value->official);    
            }
        }
        
        Header('Content-type: text/xml');
        print($xml->asXML());
    }
    ?>

     

    I also learned, that even though I'm using Unix/Linux server software, I'm still using Windows that doesn't like Unix/Linux file names and folder scructors.  So we updated the XML to include the whole path.

    <?xml version="1.0" encoding="ISO-8859-1"?>
    <covers><title id="07398CDC" name="AfterShock Pool SX" mediaid="" filename="Cover.png" type="" mainlink="http://mylanserverip/xbox360/covers/07398CDC/full/Cover.png" front="http://mylanserverip/xbox360/covers/07398CDC/front/Cover.png" Official="1"/></covers>

    It now working for my, and I hope this works for everyone else in the near future is need be on a Windows machine.

    • Like 1

  3. Okay, so I have a problem.  Thanks, Gualdimar again for helping me out.

    So, because when I use FSD 3's WebUI it crashes FreeStyle Dash when I update the covers.  I would really like this to work, but if not I'll do what a friend said to do and wipe the FreeStyle Dash /DATA sub directory and start over....  Anyway, I have a couple of HomeBrew Games that were PC Games and ported over to run on the XBox Classic by a team named AfterShock.  So, XBoxUnity.net does not have their covers.  Since I custom made a cover for the game AfterShock Pool SX, I followed Gualdimar's instructions he gave me a couple post back.  Since Aftershock Pool SX's Title ID is 07398CDC, I created the sub folder on my  server  \\mylanserverpc\xbox360\covers\07398CDC.  I used his example an created this XML since I'm not a programmer and knowing nothing about XML or PHP:

    <?xml version="1.0" encoding="ISO-8859-1"?>
    <covers><title id="07398CDC" name="AfterShock Pool SX" mediaid="" filename="Cover.png" type="" mainlink="http://mylanserverip/xbox360/covers/07398CDC" front="http://mylanserverip/xbox360/covers/07398CDC" Official="1"/></covers>

    I also updated the covers.php following directions:

    <?php
    $titleid=strtoupper($_GET['id']);
    if($_GET['query'] == "TitleID")
    {
        if (file_exists('covers/'.$titleid))
        {
            include('covers/'.$titleid);
        }
        else
        {
            $ch = curl_init();
            $options = [
                CURLOPT_SSL_VERIFYPEER => false,
                CURLOPT_RETURNTRANSFER => true,
                CURLOPT_URL            => 'http://xboxunity.net/api/Covers/'.$titleid
            ];
            
            curl_setopt_array($ch, $options);
            $data = json_decode(curl_exec($ch));
            curl_close($ch);
            
            cover($data);
    }
        ];
        
        curl_setopt_array($ch, $options);
        $data = json_decode(curl_exec($ch));
        curl_close($ch);
        
        cover($data);
    }

    function cover($data)
    {
        $xml = new SimpleXMLElement('<?xml version="1.0" encoding="ISO-8859-1"?>'.'<covers/>');
            
        if(count($data)>0)
        {
            foreach ($data as &$value) {        
                $title = $xml->addChild('title');
                $title->addAttribute('id',$value->titleid);
                $title->addAttribute('name',$value->name);
                $title->addAttribute('mediaid','');
                $title->addAttribute('filename','Cover.png');
                $title->addAttribute('type','');
                $title->addAttribute('mainlink',$value->url);
                $title->addAttribute('front',$value->front);
                $title->addAttribute('Official',(int)$value->official);    
            }
        }
        
        Header('Content-type: text/xml');
        print($xml->asXML());
    }
    ?>

    So anyone want to try and help figure out why covers.php won't grab the local cover?


  4. 19 hours ago, Gualdimar said:

    rileyil77you need to create a folder named covers in the direcoty with cover.php

    example: for GTA5 cover you should create a file named 545408A7 with a proper xml answer for fsd:

    
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <covers><title id="545408A7" name="GTA V" mediaid="" filename="Cover.png" type="" mainlink="http://XboxUnity.net/api/boxart/5679" front="http://XboxUnity.net/api/boxartfront/5679" Official="1"/></covers>

    and the first 25 lines of cover.php should look like this:

    So I take it where the XML says for example:  mainlink="http://XboxUnity.net/api/boxart/5679, I would replace with example:  mainlink="http://myserverip/xbox360/cover/5679

    Also a great update to the default.xex creator would be to point to the q.php.  I think it would be awesome to have weather back on my modded XBox 360 under FreeStyle Dash.

    Thanks again for all your help.


  5. On 11/5/2016 at 4:37 PM, Gualdimar said:

    it is, but a little bit of php coding and mysql can transform it into your own cover db. it is esspecialy usefull because of broken push to xbox function.

    this scripts are just base, they aren`t ready solution.

    presonaly i`m too lazy to install mysql, so i created xml files with favourites covers on my local server and used this code in cover.php:

    
    	if (file_exists('covers/'.$titleid))
    	{
    		include('covers/'.$titleid);
    	}
    	else
    	{
    		//request to xboxunity
    	}

    So, since I would like to also do this, where in your PHP script do I add these lines?


  6. I bought XBox Classic Game:  Sonic Riders for my 7 year old's birthday.  He can play the game great on his retail XBox 360 Phat that I had for years, before I bought another one and had it modded a couple years ago.  On my R-JTag machine, I can get the game up running until it tells me to press start.  My controller's start button is not working at all in the emulator...  Since I softmod consoles all the time, and my friend hard mods consoles, I own a copy of Splinter Cell for XBox Classic, still start button doesn't work.  Once I'm playing a 360 game, or another emulator the start button works like a charm.  Is there away to correct this problem?  Maybe some type of button mapping I could do for the XBox1 emulator?

×
×
  • Create New...