Developer's Blog
Register Low Fi Mark Forums Read

Notices

Reply
 
Thread Tools
Old 10-27-2012, 06:57 AM   #281
ForbiddenSaga
Member
 
Join Date: Aug 2012
Posts: 2
ForbiddenSaga is offline

Default PHP Dota Replay Parser (CDP)


I was just reading the post about hacking and everything...

About double extension, you can stop it by adding this

PHP Code:
(substr_count($filename".") == 1
On this line
PHP Code:
if (($ext == "w3g") && $_FILES["replay_file"]["size"] < MAX_UPLOAD_SIZE) { 
So user can't upload anything with double extension.

PHP Code:
if ((substr_count($filename".") == 1) && ($ext == "w3g") && $_FILES["replay_file"]["size"] < MAX_UPLOAD_SIZE) {
             
//Determine the path to which we want to save this file
              
$newname dirname(__FILE__).'/replays/'.$uniqueID.'.'.$ext;
              
//Check if the file with the same name is already exists on the server
              
if (!file_exists($newname)) {
                
//Attempt to move the uploaded file to it's new place
                
if ((move_uploaded_file($_FILES['replay_file']['tmp_name'], $newname))) {
                   
$replayFile $uniqueID.'.'.$ext;
                   
$replayUploaded true
I tried it, and it stopped the double extension files from being uploaded
Sorry if i'm giving the wrong advice, i'm a noob in php, just trying my best... ^^
  Reply With Quote
Old 10-27-2012, 08:35 AM   #282
Madchen
Member
 
Madchen's Avatar
 
Join Date: Jun 2009
Location: Herzegovina
Posts: 698
Madchen is offline
Default Re: PHP Dota Replay Parser (CDP)

Quote:
Originally Posted by BitchGotRaped View Post
5. Fixed a huge bug that allowed hackers to upload .php files via exploit.
Note: Ranked Gaming Parser is the only parser with that fix, other parsers can be easily hacked anytime, thus we bring you full security in all means necessary.
You aren't the only one and nothing is 100% bullet proof. Never-ever.
__________________
  Reply With Quote
Old 10-31-2012, 11:03 PM   #283
bloor
Member
 
bloor's Avatar
 
Join Date: Jan 2010
Location: Romania [Bucharest]
Posts: 26
bloor is offline
Default Re: PHP Dota Replay Parser (CDP)

Isssue with SKILL code “A1YY” — Phoenix Laser Beam.
Is not in the XML. Parser crashes.

PS: i changed the reshine.php so it skips the bad attributes [that generate no $heroId] in the case loop.

I added some lines right after the $heroId is generated:
Code:
if (strlen($heroId) != 4){
  echo "[#1]Unidentified attribute code: ".$value->getId()."<br>";
  break;
}
This ensures that the missing attribute won’t halt/stop the repaly parsing and also gives me feedback with the missing attribute code from XML.
But other can simply use :
Code:
if (strlen($heroId) != 4) break;
Cheers.
__________________
  Reply With Quote
Last edited by bloor; 11-01-2012 at 10:10 PM.
Old 11-07-2012, 08:44 PM   #284
JeremyJohn
Member
 
JeremyJohn's Avatar
 
Join Date: Sep 2009
Location: Malaysia
Posts: 23
JeremyJohn is offline
Post Re: PHP Dota Replay Parser (CDP)

Quote:
Originally Posted by bloor View Post
Isssue with SKILL code A1YY Phoenix Laser Beam.
Is not in the XML. Parser crashes.
To be exact:
Code:
   <Item>
      <Art>images/phoenix.jpg</Art>
      <Comment/>
      <Cost/>
      <Id>E02F</Id>
      <Name>Phoenix</Name>
      <ProperNames>Icarus</ProperNames>
      <RelatedTo>Aamk,A1YX,A1YY,A1RK,A1RJ</RelatedTo>
      <Type>HERO</Type>
    </Item>
Code:
      <Item>
      <Art>images/sun_ray.jpg</Art>
      <Comment/>
      <Cost/>
      <Id>A1YY</Id>
      <Name>Sun Ray</Name>
      <ProperNames/>
      <RelatedTo/>
      <Type>SKILL</Type>
     </Item>
Quote:
Originally Posted by bloor View Post
PS: i changed the reshine.php so it skips the bad attributes [that generate no $heroId] in the case loop.

I added some lines right after the $heroId is generated:
Code:
if (strlen($heroId) != 4){
  echo "[#1]Unidentified attribute code: ".$value->getId()."<br>";
  break;
}
This ensures that the missing attribute wont halt/stop the repaly parsing and also gives me feedback with the missing attribute code from XML.
But other can simply use :
Code:
if (strlen($heroId) != 4) break;
Cheers.
At what line exactly?
__________________

Regards
Jeremy John

  Reply With Quote
Old 11-08-2012, 01:41 AM   #285
bloor
Member
 
bloor's Avatar
 
Join Date: Jan 2010
Location: Romania [Bucharest]
Posts: 26
bloor is offline
Default Re: PHP Dota Replay Parser (CDP)

Somewhere between #720 - #730
Dunno exactly i don't have the original reshine.php.

Search for
Code:
                case 'SKILL':
                case 'ULTIMATE':
                case 'STAT':
                  $heroId = $GLOBALS['xml_data']->SkillToHeroMap[$value->getId()];
And right after those line. I inserted a validate check on $heroId.
HTML Code:
if (strlen($heroId) != 4) break;
PS: The skill is actually already in the map XML. Issue, as i found out later on, is that it's not added in the Hero Related IDs:

Code:
    <RelatedTo>Aamk,A1YX,A1YY,A1RK,A1RJ, A1YY</RelatedTo>
__________________
  Reply With Quote
Old 11-08-2012, 11:23 AM   #286
JeremyJohn
Member
 
JeremyJohn's Avatar
 
Join Date: Sep 2009
Location: Malaysia
Posts: 23
JeremyJohn is offline
Smile Re: PHP Dota Replay Parser (CDP)

Quote:
Originally Posted by bloor View Post
Somewhere between #720 - #730
Dunno exactly i don't have the original reshine.php.

Search for
Code:
                case 'SKILL':
                case 'ULTIMATE':
                case 'STAT':
                  $heroId = $GLOBALS['xml_data']->SkillToHeroMap[$value->getId()];
And right after those line. I inserted a validate check on $heroId.
HTML Code:
if (strlen($heroId) != 4) break;
PHP Code:
                  break;
                case 
'SKILL':
                case 
'ULTIMATE':
                case 
'STAT':
                  
                  
// Find the hero with the SkillID in RelatedTo
                  
$heroId $GLOBALS['xml_data']->SkillToHeroMap[$value->getId()];
                  if (
strlen($heroId) != 4){
                      echo 
"[#1]Unidentified attribute code: ".$value->getId()."<br>";
                      break;
                  }
                  
$heroName   $GLOBALS['xml_data']->HashMap[$heroId]->getName();

                  
$pid $this->players[$player_id]['dota_id']; 
Like this?
Quote:
Originally Posted by bloor View Post
PS: The skill is actually already in the map XML. Issue, as i found out later on, is that it's not added in the Hero Related IDs:

Code:
    <RelatedTo>Aamk,A1YX,A1YY,A1RK,A1RJ, A1YY</RelatedTo>
I usually don't use the new replay xml but instead just manually do a compare and override any new changes as every new xml is not that accurate to the IDs sometimes and also i notice
Code:
    <RelatedTo>Aamk,A1YX,A1YY,A1RK,A1RJ</RelatedTo>
can't have any extra ID's which are not used by the hero and has to be in the proper order or else it'll crash.
__________________

Regards
Jeremy John

  Reply With Quote
Old 11-08-2012, 11:43 PM   #287
bloor
Member
 
bloor's Avatar
 
Join Date: Jan 2010
Location: Romania [Bucharest]
Posts: 26
bloor is offline
Default Re: PHP Dota Replay Parser (CDP)

Yes like that.
__________________
  Reply With Quote
Old 11-12-2012, 12:55 PM   #288
JeremyJohn
Member
 
JeremyJohn's Avatar
 
Join Date: Sep 2009
Location: Malaysia
Posts: 23
JeremyJohn is offline
Smile Re: PHP Dota Replay Parser (CDP)

Quote:
Originally Posted by aldaris565 View Post
The search doesn't work well...not even in your page =/
http://www.dotatalk.com/replay_search.php
When you go to page 2 or 3 ... nothing appear =/
maybe you can fix it..thanks anyway!
Quote:
Originally Posted by Madchen View Post
Sorry no time right now. Prolly it will not take mee too much time but for now just do this:

1. open replay_search.php
2. Find this line
PHP Code:
rowsperpage 10//This is the number of results displayed per page 
and change to 1000

This way it will display all search results in one page.
The Proper Fix:

Quote:
Find all:
PHP Code:
$_POST 
replace all with:
PHP Code:
$_GET 
Quote:
Find at line 83
HTML Code:
<form name="form" action="<?php echo $_SERVER['PHP_SELF']?>" method="post">
replace with:
HTML Code:
<form name="form" action="<?php echo $_SERVER['PHP_SELF']?>" method="get">

Find line 112 - 147:
PHP Code:
                        // if not on page 1, don't show back links
                        
if ($currentpage 1) {
                           
// show << link to go back to page 1
                           
echo " <a href='{$_SERVER['PHP_SELF']}?currentpage=1'><<</a> ";
                           
// get previous page num
                           
$prevpage $currentpage 1;
                           
// show < link to go back to 1 page
                           
echo " <a href='{$_SERVER['PHP_SELF']}?currentpage=$prevpage'><</a> ";
                        } 
// end if 

                        // loop to show links to range of pages around current page
                        
for ($x = ($currentpage $range); $x < (($currentpage $range) + 1); $x++) {
                           
// if it's a valid page number...
                           
if (($x 0) && ($x <= $totalpages)) {
                              
// if we're on current page...
                              
if ($x == $currentpage) {
                                 
// 'highlight' it but don't make a link
                                 
echo " [<b>$x</b>] ";
                              
// if not current page...
                              
} else {
                                 
// make it a link
                                 
echo " <a href='{$_SERVER['PHP_SELF']}?currentpage=$x'>$x</a> ";
                              } 
// end else
                           
// end if 
                        
// end for
                                         
                        // if not on last page, show forward and last page links        
                        
if ($currentpage != $totalpages) {
                           
// get next page
                           
$nextpage $currentpage 1;
                            
// echo forward link for next page 
                           
echo " <a href='{$_SERVER['PHP_SELF']}?currentpage=$nextpage'>></a> ";
                           
// echo forward link for lastpage
                           
echo " <a href='{$_SERVER['PHP_SELF']}?currentpage=$totalpages'>>></a> ";
                        } 
// end if
                        /****** end build pagination links ******/ 
replace with:
PHP Code:
                        // if not on page 1, don't show back links
                        
if ($currentpage 1) {
                           
// show << link to go back to page 1
                           
echo " <a href='{$_SERVER['PHP_SELF']}?searchText={$_GET['searchText']}&submit=Search&currentpage=1'><<</a> ";
                           
// get previous page num
                           
$prevpage $currentpage 1;
                           
// show < link to go back to 1 page
                           
echo " <a href='{$_SERVER['PHP_SELF']}?searchText={$_GET['searchText']}&submit=Search&currentpage=$prevpage'><</a> ";
                        } 
// end if 

                        // loop to show links to range of pages around current page
                        
for ($x = ($currentpage $range); $x < (($currentpage $range) + 1); $x++) {
                           
// if it's a valid page number...
                           
if (($x 0) && ($x <= $totalpages)) {
                              
// if we're on current page...
                              
if ($x == $currentpage) {
                                 
// 'highlight' it but don't make a link
                                 
echo " [<b>$x</b>] ";
                              
// if not current page...
                              
} else {
                                 
// make it a link
                                 
echo " <a href='{$_SERVER['PHP_SELF']}?searchText={$_GET['searchText']}&submit=Search&currentpage=$x'>$x</a> ";
                              } 
// end else
                           
// end if 
                        
// end for
                                         
                        // if not on last page, show forward and last page links        
                        
if ($currentpage != $totalpages) {
                           
// get next page
                           
$nextpage $currentpage 1;
                            
// echo forward link for next page 
                           
echo " <a href='{$_SERVER['PHP_SELF']}?searchText={$_GET['searchText']}&submit=Search&currentpage=$nextpage'>></a> ";
                           
// echo forward link for lastpage
                           
echo " <a href='{$_SERVER['PHP_SELF']}?searchText={$_GET['searchText']}&submit=Search&currentpage=$totalpages'>>></a> ";
                        } 
// end if
                        /****** end build pagination links ******/ 
__________________

Regards
Jeremy John

  Reply With Quote
Old 11-21-2012, 09:57 AM   #289
cen1
Member
 
Join Date: Aug 2011
Posts: 3
cen1 is offline
Default Re: PHP Dota Replay Parser (CDP)

A simple bash script for people who own several leagues and want to update them all at once. Just put absolute paths to your parser directories in dir.txt, one per line.

Update with
Quote:
bash ./autoupdate.sh <link to latest patch>

for example:
bash ./autoupdate.sh http://luka.zabkar.net/patch.1.4.5-1.4.6.zip
I left examples in dir.txt for reference.

If the author could setup a simple xml file with latest version on his server we could just throw it on cron and not care about updates ever again. Please do it if possible.
  Reply With Quote
Last edited by cen1; 12-19-2012 at 10:42 PM.
Old 11-22-2012, 02:33 PM   #290
Seven
Member
 
Seven's Avatar
 
Join Date: Jun 2009
Posts: 71
Seven is offline
Default Re: PHP Dota Replay Parser (CDP)

Regarding the upload exploit.

In all honesty I actually managed to miss the whole conversation in this thread due to not scrolling back enough and I only get email notifications by this board for the very first new post, not every subsequent one.

That aside, uploading is always risky and not part of the parser core, but the upload_replay.php script I supply seems to handle filename injection well enough.

Its basic mode of operation when dealing with filenames is:

1. Get all characters following the last "." dot character from the uploaded filename.
2. If those characters equal "w3g" proceed with processing.
3. Create a unique ID for the file such as a timestamp in my case.
4. Prepare new filename which is uniqueID + extension -> 1350859626.w3g
5. Store file in /replays/1350859626.w3g

I don't see how you could wind up with a ".php" string in there, but I might be missing something.

A few bytes on allowing users to upload arbitrary files

1. Your upload folder should not be publicly accessible if at all possible. It should be located outside of your web root or properly chmoded.

2. If however it is, due to shared hosting or limitations of your hosting provider. You should use an .htacess file (or its equivalent for other servers) for the /replays folder which disallows any access.

Code:
ORDER allow,deny
DENY from all
3. That's the whole reason why there's a download.php script packaged with this Frontend example. It's an example of safely serving files from your /replays directory without the need to allow actual directory access to your users. The download.php script reads and reouputs the file.


@cen1:
You could always use http://luka.zabkar.net/cdp_latest.zip. a header check should suffice to check if a change was made?
__________________
"An eye for an eye makes everybody blind."
  Reply With Quote
Last edited by Seven; 11-22-2012 at 09:04 PM.
Old 11-22-2012, 06:55 PM   #291
cen1
Member
 
Join Date: Aug 2011
Posts: 3
cen1 is offline
Default Re: PHP Dota Replay Parser (CDP)

Quote:
Originally Posted by Seven View Post
Regarding the upload exploit.

In all honesty I actually managed to miss the whole conversation in this thread due to not scroll back high enough and I only get email notifications by this board for the very first new post, not every subsequent one.

That aside, uploading is always risky and not part of the parser core, but the upload_replay.php script I supply seems to handle filename injection well enough.

Its basic mode of operation when dealing with filenames is:

1. Get all characters following the last "." dot character from the uploaded filename.
2. If those characters equal "w3g" proceed with processing.
3. Create a unique ID for the file such as a timestamp in my case.
4. Prepare new filename which is uniqueID + extension -> 1350859626.w3g
5. Store file in /replays/1350859626.w3g

I don't see how you could wind up with a ".php" string in there, but I might be missing something.

A few bytes on allowing users to upload arbitrary files

1. Your upload folder should not be publicly accessible if at all possible. It should be located outside of your web root or properly chmoded.

2. If however it is, due to shared hosting or limitations of your hosting provider. You should use an .htacess file (or its equivalent for other servers) for the /replays folder which disallows any access.

Code:
ORDER allow,deny
DENY from all
3. That's the whole reason why there's a download.php script packaged with this Frontend example. It's an example of safely serving files from your /replays directory without the need to allow actual directory access to your users. The download.php script reads and reouputs the file.


@cen1:
You could always use http://luka.zabkar.net/cdp_latest.zip. a header check should suffice to check if a change was made?
I get Last-Modified: Sun, 21 Oct 2012 22:34:48 GMT for the latest. Is this correct?

I guess it will be good enough.
  Reply With Quote
Old 12-01-2012, 10:33 PM   #292
Atanych
Member
 
Join Date: Nov 2012
Posts: 1
Atanych is offline
Default Re: PHP Dota Replay Parser (CDP)

Hello. I create DB with your soft. But some replays.w3g dont work.
Quote:
Fatal error: Call to a member function getName() on a non-object in Z:\home\test1.ru\www\reshine.php on line 747
Help pls.
  Reply With Quote
Old 12-11-2012, 05:47 AM   #293
HappySmileyFace
Member
 
Join Date: Jun 2012
Posts: 1
HappySmileyFace is offline
Default Re: PHP Dota Replay Parser (CDP)

Sorry for this reply: how can I add "Action time" Like this -> : http://www.dotareplay.tk/view_replay...1355135299.w3g
on my parser? can anyone help me? )
  Reply With Quote
Old 12-19-2012, 10:37 PM   #294
cen1
Member
 
Join Date: Aug 2011
Posts: 3
cen1 is offline
Default Re: PHP Dota Replay Parser (CDP)

Here is a second version of parser autoupdate script. It allows you to automatically update all your parser directories as soon as new patch comes out.

1. Edit dir.txt and write all your parser paths (absolute), one per line
ex:
Quote:
/var/www/parser1
/var/www/parser2
2. Run autoupdate.sh
ex:
Quote:
bash autoupdate.sh
You can also put the command to cron and forget about the updating forever.

To force an update even if your parsers are up to date, modify olddt.txt to whatever and date mismatch will make the update happen.


Regards
Attached Files
File Type: zip parser.zip (874 Bytes, 0 views)
  Reply With Quote
Old 12-24-2012, 12:32 AM   #295
EuI.
Banned
 
Join Date: Feb 2012
Posts: 119
EuI. is offline
Default Re: PHP Dota Replay Parser (CDP)

I still can't get this to work. It provides a replay with no information aside from Download.
  Reply With Quote
Old 01-14-2013, 11:50 PM   #296
bloor
Member
 
bloor's Avatar
 
Join Date: Jan 2010
Location: Romania [Bucharest]
Posts: 26
bloor is offline
Default Re: PHP Dota Replay Parser (CDP)

Quote:
Originally Posted by EuI. View Post
I still can't get this to work. It provides a replay with no information aside from Download.
If the game was finished by !ff you will mostly get empty results. Seven's parser extract data from end-game statistics. Games not ended by throne/tree destroyed have no such statistics [only some rare info sent by the game from time to time].

Maybe that's why.
__________________
  Reply With Quote
Old 01-16-2013, 06:30 PM   #297
BitchGotRaped
Member
 
Join Date: Jun 2012
Posts: 11
BitchGotRaped is offline
Default Re: PHP Dota Replay Parser (CDP)

Does anyone have the map xml for 6.77 and 6.77b ?
  Reply With Quote
Old 01-18-2013, 04:53 AM   #298
xuanson138
Member
 
xuanson138's Avatar
 
Join Date: Oct 2011
Posts: 50
Blog Entries: 2314
xuanson138 is offline
Default Re: PHP Dota Replay Parser (CDP)

i was being exaggerated
  Reply With Quote
Old 01-31-2013, 09:13 AM   #299
bloor
Member
 
bloor's Avatar
 
Join Date: Jan 2010
Location: Romania [Bucharest]
Posts: 26
bloor is offline
Default Re: PHP Dota Replay Parser (CDP)

So yeah.
It's almost done. Probably starting next week i will able to release the Beta version



Printscreened just the 1st panel [replay]. There are 3 more [chat/ map / download&share]
__________________
  Reply With Quote
Old 01-31-2013, 05:23 PM   #300
ForbiddenSaga
Member
 
Join Date: Aug 2012
Posts: 2
ForbiddenSaga is offline
Default

okay bloor.... im amazed

Sent from my GT-I9100 using Tapatalk 2
  Reply With Quote
Old 02-09-2013, 11:23 AM   #301
jezuz
Member
 
Join Date: Nov 2010
Posts: 2
jezuz is offline
Default Re: PHP Dota Replay Parser (CDP)

Ye, it's bloody well designed bloor. Wish i had those skills tt.
  Reply With Quote
Old 02-10-2013, 01:52 AM   #302
bloor
Member
 
bloor's Avatar
 
Join Date: Jan 2010
Location: Romania [Bucharest]
Posts: 26
bloor is offline
Smile Re: PHP Dota Replay Parser (CDP)

You may take a peek as i finish last things to code for the Beta Release:

http://www.ro-community.com/parser/r...lay=1360460699

BEST WITH CHROME.

PS: it will not be available / compatible for IE usage [i`m really starting an anti-IE campaign with this parser]

PPS: my tiny-skillz are too damn high !
__________________
  Reply With Quote
Old 02-10-2013, 09:51 PM   #303
MauranKilom
Member
 
MauranKilom's Avatar
 
Join Date: Jan 2010
Location: Germany
Posts: 6,065
MauranKilom is online now
Default Re: PHP Dota Replay Parser (CDP)

That parser looks really awesome! The only downside is that it loads kind of slowly...
__________________
I might edit my p0sts frequently and rapidly after posting.
DotA code of the month:
Jass:
if GetRandomInt(0,10)<11 then

Fix OD combo! IMPLEMENTED!
  Reply With Quote
Old 02-10-2013, 10:14 PM   #304
bloor
Member
 
bloor's Avatar
 
Join Date: Jan 2010
Location: Romania [Bucharest]
Posts: 26
bloor is offline
Default Re: PHP Dota Replay Parser (CDP)

It loads slow the 1st time. Aftewards, the page is cached and loads much faster.
Had no choice, the loading screen is there to make sure all the resources are loaded and the page will be fully-displayed afterwards. I personally don't like pages loading element by element in front of my eyes.

As for the slow animations and sliders there will be a small button available to disable all those fancy eye-candy effects
__________________
  Reply With Quote
Old 02-10-2013, 10:18 PM   #305
MauranKilom
Member
 
MauranKilom's Avatar
 
Join Date: Jan 2010
Location: Germany
Posts: 6,065
MauranKilom is online now
Default Re: PHP Dota Replay Parser (CDP)

Well it didn't load considerably faster even on the fourth time :/
I mean, yes, it did load a bit faster, but not much...
__________________
I might edit my p0sts frequently and rapidly after posting.
DotA code of the month:
Jass:
if GetRandomInt(0,10)<11 then

Fix OD combo! IMPLEMENTED!
  Reply With Quote
Old 02-10-2013, 10:24 PM   #306
bloor
Member
 
bloor's Avatar
 
Join Date: Jan 2010
Location: Romania [Bucharest]
Posts: 26
bloor is offline
Default Re: PHP Dota Replay Parser (CDP)

It highly depends on browser also..
The page loading speed is:

1. Chrome
2. Opera
3. Mozzila

Also the current server is in Romania, and i`m pretty sure it;s not much of a server, so probably the connection is very low to your side of the globe. I think the site loads aprox. 4-5MB of resources.

-- anyhow 10x for the feedback. I`'ll include this to be fixed in the optimization phase. Much appreciated.
__________________
  Reply With Quote
Old 02-10-2013, 10:36 PM   #307
MauranKilom
Member
 
MauranKilom's Avatar
 
Join Date: Jan 2010
Location: Germany
Posts: 6,065
MauranKilom is online now
Default Re: PHP Dota Replay Parser (CDP)

Quote:
Originally Posted by bloor View Post
the connection is very low to your side of the globe.
I lol'd.
__________________
I might edit my p0sts frequently and rapidly after posting.
DotA code of the month:
Jass:
if GetRandomInt(0,10)<11 then

Fix OD combo! IMPLEMENTED!
  Reply With Quote
Old 02-10-2013, 10:39 PM   #308
bloor
Member
 
bloor's Avatar
 
Join Date: Jan 2010
Location: Romania [Bucharest]
Posts: 26
bloor is offline
Default Re: PHP Dota Replay Parser (CDP)

No rlly. My webhosting package (1.5E /month) has

100MB bandwith -- internal
and only
10MB bandwith -- external


So it's pretty normal for outsiders to load page slower. When finished will move to a better server.
__________________
  Reply With Quote
Old 02-24-2013, 04:27 AM   #309
dek156
Member
 
Join Date: Feb 2013
Posts: 4
dek156 is offline
Default Re: PHP Dota Replay Parser (CDP)

Delete pl
  Reply With Quote
Last edited by dek156; 03-03-2013 at 02:32 AM.
Old 02-24-2013, 06:27 AM   #310
JeremyJohn
Member
 
JeremyJohn's Avatar
 
Join Date: Sep 2009
Location: Malaysia
Posts: 23
JeremyJohn is offline
Default Re: PHP Dota Replay Parser (CDP)

Quote:
Originally Posted by dek156 View Post
Help Me

error 1

http://oi46.tinypic.com/2iauefr.jpg

error 2

clicked view detallais

http://oi45.tinypic.com/2u95wxw.jpg

Let me guess you forgot to install PHP?
__________________

Regards
Jeremy John

  Reply With Quote
Old 02-24-2013, 05:40 PM   #311
dek156
Member
 
Join Date: Feb 2013
Posts: 4
dek156 is offline
Default Re: PHP Dota Replay Parser (CDP)

Delete pl
  Reply With Quote
Last edited by dek156; 03-03-2013 at 02:31 AM.
Old 02-27-2013, 02:53 AM   #312
dek156
Member
 
Join Date: Feb 2013
Posts: 4
dek156 is offline
Default Re: PHP Dota Replay Parser (CDP)

Delete pl
  Reply With Quote
Last edited by dek156; 03-03-2013 at 02:31 AM.
Old 02-28-2013, 10:39 PM   #313
dek156
Member
 
Join Date: Feb 2013
Posts: 4
dek156 is offline
Default Re: PHP Dota Replay Parser (CDP)

Delete pl
  Reply With Quote
Last edited by dek156; 03-03-2013 at 02:31 AM.
Old 03-03-2013, 12:00 PM   #314
vantung_311
Member
 
Join Date: Oct 2010
Posts: 1
vantung_311 is offline
Default Re: PHP Dota Replay Parser (CDP)

you can share the for proving full index code post replay dota are not
  Reply With Quote
Old 03-08-2013, 09:02 AM   #315
DotaBattleNet
Member
 
Join Date: Dec 2012
Posts: 2
DotaBattleNet is offline
Default Re: PHP Dota Replay Parser (CDP)

Hey everyone,
could someone share scripts to view all of Uploaded Replay/Archieve/Database Replay please...

like one of this
http://rankedgamingparser.com/replaydb.php
http://dotaparser.net/archive
  Reply With Quote
Old 03-11-2013, 07:42 PM   #316
AucT
Member
 
AucT's Avatar
 
Join Date: Aug 2009
Posts: 772
Blog Entries: 36
AucT is offline
Default Re: PHP Dota Replay Parser (CDP)

I think they add to database some data when sm1 uploaded replay

create db with table replays with 4 varchar/text columns title, date, saver, file
in the upload_replay.php on line 154 after if print info add

PHP Code:
$mysqli = new mysqli('localhost''root''''cdparser');
$mysqli->query('INSERT INTO replays VALUES ("'.$title.'", "'.date('Y-m-d H:i:s').'", "'.$replay->game['saver_name'].'", "'.$replayFile.'")');
$mysqli->close(); 
and create database.php or where you want to get list of replays
PHP Code:
<table>
<tr><th>Game title<th>Date<th>Saver<th>View<th>DOwnload
<?php
$mysqli 
= new mysqli('localhost''root''''cdparser');
$result $mysqli->query("Select * FROM replays");

while (
$row $result->fetch_object()) {
        echo 
"
        <tr><td>
$row->title
        <td>
$row->date
        <td>
$row->saver
        <td><a href='view_replay.php?file=
$row->file'>View</a>
        <td><a href='download_replay.php?file=
$row->file'>Download</a>";
    }
$mysqli->close();
?>
</table>
and change ('localhost', 'root', '', 'cdparser') to ('your host', 'user', 'password', 'database name')
  Reply With Quote
Last edited by AucT; 03-11-2013 at 08:37 PM.
Old 03-12-2013, 01:30 PM   #317
AbsoluteMSTR
Member
 
Join Date: Aug 2009
Posts: 2
AbsoluteMSTR is offline
Default Re: PHP Dota Replay Parser (CDP)

Quote:
Originally Posted by bloor View Post
You may take a peek as i finish last things to code for the Beta Release:

http://www.ro-community.com/parser/r...lay=1360460699

BEST WITH CHROME.

PS: it will not be available / compatible for IE usage [i`m really starting an anti-IE campaign with this parser]

PPS: my tiny-skillz are too damn high !
Try setting up http://www.cloudflare.com/. Its free and thats what I have setup at dotaparser.net. Will help page load time on a global scale then just in romania (if thats where you host it).
  Reply With Quote
Old 03-18-2013, 06:50 PM   #318
bloor
Member
 
bloor's Avatar
 
Join Date: Jan 2010
Location: Romania [Bucharest]
Posts: 26
bloor is offline
Default Re: PHP Dota Replay Parser (CDP)

Quote:
Originally Posted by AbsoluteMSTR View Post
Try setting up http://www.cloudflare.com/. Its free and thats what I have setup at dotaparser.net. Will help page load time on a global scale then just in romania (if thats where you host it).
Have it in my agenda. Will do after i change webhost to a professional one.
__________________
  Reply With Quote
Old 04-14-2013, 04:52 PM   #319
joealonez
Member
 
Join Date: Jan 2011
Posts: 4
joealonez is offline
Default Re: PHP Dota Replay Parser (CDP)

Quote:
Originally Posted by AucT View Post
I think they add to database some data when sm1 uploaded replay

create db with table replays with 4 varchar/text columns title, date, saver, file
in the upload_replay.php on line 154 after if print info add

PHP Code:
$mysqli = new mysqli('localhost''root''''cdparser');
$mysqli->query('INSERT INTO replays VALUES ("'.$title.'", "'.date('Y-m-d H:i:s').'", "'.$replay->game['saver_name'].'", "'.$replayFile.'")');
$mysqli->close(); 
and create database.php or where you want to get list of replays
PHP Code:
<table>
<tr><th>Game title<th>Date<th>Saver<th>View<th>DOwnload
<?php
$mysqli 
= new mysqli('localhost''root''''cdparser');
$result $mysqli->query("Select * FROM replays");

while (
$row $result->fetch_object()) {
        echo 
"
        <tr><td>
$row->title
        <td>
$row->date
        <td>
$row->saver
        <td><a href='view_replay.php?file=
$row->file'>View</a>
        <td><a href='download_replay.php?file=
$row->file'>Download</a>";
    }
$mysqli->close();
?>
</table>
and change ('localhost', 'root', '', 'cdparser') to ('your host', 'user', 'password', 'database name')
Fatal error: Class 'mysqli' not found in ........
  Reply With Quote
Old 06-14-2013, 06:18 PM   #320
DotaBattleNet
Member
 
Join Date: Dec 2012
Posts: 2
DotaBattleNet is offline
Default Re: PHP Dota Replay Parser (CDP)

could someone update the XML for the latest map ( dota 6.78b )
thanks
  Reply With Quote
Reply
  Entertainment Programming


Forum Jump

Thread Tools