EDIT: It is now hosted on github https://github.com/philip284/TwoKinds-Download-Script
Hey, I just finished my scripts to download TwoKinds.
Here it is. TwoKinds Download Script
For using this you would need a PHP server, so you could do this http://www.howtogeek.com/howto/14998/tu ... web-server and get one on a flash drive.
Once you have uploaded, navigate to index.php, the errors will disappear once you click update and let it run.
Note: it will not get the newest one and does not require a database
Script to download TwoKinds
Moderator: Moderators
Re: Script to download TwoKinds
Oh god, another scraper! The VPS can't handle- Oh, wait. I don't care about that anymore now Keenspot does the hosting.
So, Yay! Someone's doing nifty stuff with the site!
===
Now, a few questions about the script itself. Warning - I love optimization.
On a completely different note, might I recommend using GitHub? Its integration with git is particularly useful, and the zipped download file will be automagically updated whenever you upload some changes. (That's if you are using git. If you're using an alternate CVS, no problem. But if you're not, git is a great place to start. I found it invaluable while working on the RSS and archive scripts.)
Nice work though. I didn't know there was a PHP script that would parse a HTML page. I learnt something!
So, Yay! Someone's doing nifty stuff with the site!
===
Now, a few questions about the script itself. Warning - I love optimization.
- What do file.php and variables.php do? (Seemingly nothing, as far as I can tell. No references outside of those two files.)
- savejsoncomic.php seems to be a testing file, any reason it was included?
- The function objectToArray doesn't have to be in index.php, view.php and update.php - you're already requiring mainclass.php, you can just declare it in there.
- Actually, as far as I can tell, the only purpose of objectToArray the JSON object to an array. json_decode can automatically do that (2nd parameter), so having the function isn't strictly necessary.
- The date code in view.php is... overly complicated, and can be condensed. can be condensed into
Code: Select all
$day = date("l", $timestamp); $month = date("F", $timestamp); $date = $day . ", " . $month ." ". date("j", $timestamp) . "<span style=\"font-size:xx-small; vertical-align:top;\">".date("S", $timestamp)."</span>".", ".date("Y", $timestamp);
Code: Select all
$date = $timestamp->format("l, F j")."<span style='font-size:xx-small; vertical-align:top;'>".$timestamp->format("S")."</span>".$timestamp->format(", Y");
Code: Select all
$unixtime = DateTime::createFromFormat("Ymd", substr($file,0,8));
$date = $unixtime->format("l, F j")."<span style='font-size:xx-small; vertical-align:top;'>".$unixtime->format("S")."</span>".$unixtime->format(", Y");
Nice work though. I didn't know there was a PHP script that would parse a HTML page. I learnt something!
y̸̶o͏͏ų̕ sh̡o̸̵u̶̕l̴d̵̡n̵͠'̵́͠t͜͢ ̀͜͝h̶̡àv̸e͡ ̛d̷̨͡o͏̀ne ̶͠͡t҉́h̕a̧͞t̨҉́.̵̧͞.͠͞.͟avwolf wrote:"No dating dog-girls, young man, your father is terribly allergic!"
Re: Script to download TwoKinds
Ok, It is at github now https://github.com/philip284/TwoKinds-Download-Script.
Going to update everything later today.
EDIT: Everything is updated
Also $timestamp is not an object
Also file.php and variables.php were their because it was part of a CMS I was making and I just used the main code when I copied and pasted, and savejsoninstall.php was a testing file, I include it for no reason.
Going to update everything later today.
EDIT: Everything is updated
Also $timestamp is not an object
Also file.php and variables.php were their because it was part of a CMS I was making and I just used the main code when I copied and pasted, and savejsoninstall.php was a testing file, I include it for no reason.