Stealing resources from a website

A bit confidential title isn’t it? No wonder you got here. Anyways this article is about downloading some of the resources in a website which cannot be directly downloaded. Examples of these resources are: images, javascript files, css files, swf or flash files and others.

Remember that this is just for educational purposes. Studying existing code from a website is our top priority here.

Some of these resources can be easily downloaded if they are not made as a css background. Because basically you cannot just right click a css background and download it as an image.

And some are just not visible to the naked eye. But is really found on the site.

 

Page Source

The magic happens when you right click on any empty space on the website and select view page source. I’m not going to use any site as an example here. Because I might be breaking a law which I do not know. So just pick out any site that you want and try the same principles that you will find in here.

After opening up page source. You will see a bunch of code. But what you will need to find first is the files which has .css file extension. Because this is where most of the hidden images are being linked. You can find them by pressing ctrl + f on your keyboard and type in .css. Surely something will pop up.

You will just have to click on that link. If the css file is a gibberish like that of Twitter. Then you can’t rely on your naked eye to do the job for you. Just make use of the ctrl + f magic. And search for the following:

    • .jpg or .jpeg
    • .png
    • .gif

Those are the most common image types. If you found one, then just use your common sense and your knowledge on linking directories to get to the image that you want. Most of the time, the filename of the image will tell you what it is.

If the link looks something like this:

../img/system/pokemon.png

And you are currently in(Oops, don’t click the link, I think somerandomwebsite.com is really an existing domain name.):

http://somerandomwebsite.com/css/randomcss.css

Then you already know that you have to take 1 step backward to get to the proper directory:

http://somerandomwebsite.com/img/system/pokemon.png

You will do the above if you have found two dots before the img directory, if not then do something like this:

http://somerandomwebsite.com/css/img/system/pokemon.png

 

Conclusion

That’s it for this short tutorial. You can also find javascript files or any other file that you want from a site using the same principles. Just don’t forget to use what you have learned for good and not for bad.

PSP Game recommendations

As you might have notice, I also have a psp section in this blog. Although I’m not really posting that much into this section. Because I’m always busy blogging about php, and other things about computer.

What you will see in this article, are the list of games that I recommend. These are not arranged in any order. What comes to my mind first will be the first that you will see.

Each of us have different taste when it comes to games. But here’s my list:

 

GOD EATER

Yeah, I loved playing this game. But I guess I won’t really be able to finish it. I’m already at the stage where my character goes into the mind of Lindow. And I can only take one companion to support me. I’m not that skilled at dodging and defense that’s why I can’t finish the game.

image

 

 

PATAPON

One of my favorites. Because of its unique gameplay. I’m proud to say that I have played the whole series. Patapon 1-3. So far I think Patapon 3 is the best. Lots of new characters. But some elements are removed from the previous Patapon games.

  • Patapon 1
  • Patapon 2
  • Patapon 3

image

 

 

HARVEST MOON

Yes there are actually harvest moon games in psp. And again, I’m proud to say that I have played all of them. So far my favorite is the harvest moon innocent life. A futuristic version of harvest moon. Life was made a little bit easier for the farmer. And some futuristic elements were added. And that is what makes it super awesome.

  • Harvest Moon: Boy & Girl
  • Harvest Moon: Hero of the Leaf Valley
  • Harvest Moon: Innocent Life

image

 

 

FINAL FANTASY VII: CRISIS CORE

One of the first games that I have played in the psp. All I can say is that it’s awesome. Its like God Eater but I think its more awesome.

image

 

 

CRASH OF THE TITANS

I haven’t finish this game because of my lack of skill. But I think its really good, that’s why its here in my list.

image

 

 

NARUTO

I almost forgot that I really got addicted with most of the Naruto games in psp. Especially Naruto Ultimate Ninja Heroes 3. Just be careful not to destroy the buttons in your psp when you play this one. Because you really need to make your fingers fast if you are to beat the enemies in the difficult part.

Yeah, I’m proud to say that I finished this one of a hell bad ass game.

  • Naruto Ultimate Ninja Heroes 1
  • Naruto Ultimate Ninja Heroes 2: Phantom Fortress
  • Naruto Ultimate Ninja Heroes 3

image

 

 

RATCHET & CLANK

One of the adventure games that I played. I really got addicted with this game because of the gadgets that the main character was using. The weapons are also awesome. But you actually need some skills and brains to finish this one.

image

 

 

SECRET AGENT CLANK

Sad to say, I couldn’t finish this one. But it is as good as Ratchet and Clank. I assure you will also enjoy this one if you liked playing Ratchet and Clank.

image

 

GRAND THEFT AUTO: VICE CITY STORIES

I wasn’t actually serious in playing this game. I never really intended to get the missions done. What I always do when I play Vice City is to kill people until my stars becomes 5. Then I just go on and kill the police and swat until they finally kill me. Really an exciting game.

image

 

 

Conclusion

That’s it for this list. I hope you will play one of the games that I have recommended here. If you have already played all of them then my praises are unto you. You are the God of psp gaming.

And by the way, if you don’t already know. You can download most of the games on pspisoz.com. Awesome site, I might not have played any of this games without that site.

 

Images from pspisoz.com and t1.gstatic.com

Quick tip: Symbolic links in Windows

It’s already 12:28 AM. I really need to make this quick, though I’m not really sleepy.

Symbolic links as I see it, is merely a shortcut to a certain directory that you point out. The only difference is that its not actually just pointing out to another directory. Just like when you create a shortcut in windows.

Because when you click on a shortcut, it leads you to the directory which you specified when you created the shortcut.

Here’s an example. We are in drive c, the animeMusic folder is a symbolic link. While the dls is a shortcut. Examine what happens with the address on the next screenshot

image

You will see here that if I click on the folder dls. I will be brought to the actual directory that I specified in the shortcut.

image

Examine the shortcut properties:

image

This time I click on the folder animemusic. See what happens to the address:

image

The actual location of that folder is in a different drive:

image

This is great because now we can either refer to the symbolic link or the original directory if we need to.

We can use this on our web development projects when linking files:

require_once(‘c:symboliclinksomefile.php’);

Might be easier than typing the whole path in case the path that you are linking looks something like this:

d:extrasuperduperlongheavyweightfolderpathfilename.php

Well that’s a little bit exaggerated on my part but I think you get what I’m talking about here.

 

How?

Yeah, I almost forgot that I still haven’t showed you how, and this quick tip really gets longer and longer as I spout more useless words.

To create a symlink, just open up your command line and follow this general format:

mklink D  NEW_PATH BASE_PATH

D is a parameter for the mklink command which tells that a symbolic link directory must be created.

NEW_PATH is an unexisting path.

BASE_PATH is the path that you want to link to your newly created path.

Here’s an example:

mklink D C:UsersAizenMusicAnimeMusic  X:DropboxMusic

Yeah, that’s pretty much the command that I used to create the AnimeMusic symbolic link above.

Automatically start session on every page in php

Are you sick of having to type this code:

   1: <?php session_start(); ?>

On every page which requires user authentication and other aspects which require the use of session variables? Welcome to the club. In this article I’m going to show you some of the ways on how to ditch the freakin’ code.

 

Use headers

If you’re already using headers then ditch this part. Headers are php files which are used to perform operations which are repeated throughout the program. It can also be used to style every page in your application. Its also a place where you can link the javascript files which you need throughout the entire program that you are creating.

Here’s what a php header file might look like:

   1: <link rel="stylesheet" type="text/css" href="../css/adminstyle.css" />

   2: <link rel="stylesheet" type="text/css" href="../css/grayaccordion.css" />

   3: <link rel="stylesheet" type="text/css" href="../css/validationEngine.jquery.css" />

   4:  

   5: <script  type="text/javascript" src="../js/grayaccordionload.js"></script>

   6: <script  type="text/javascript" src="../js/topnav.js"></script>

   7: <script src="../js/jquery.validationEngine-en.js" type="text/javascript"></script>

   8: <script src="../js/jquery.validationEngine.js" type="text/javascript"></script>

Its not necessary to put <?php ?> tags on a header file. As you can see in the code above. But if you will need to perform operations which require the power of the server side. Then you should enclose them in <?php ?> tags.

Then you can just import them later, in a different file:

   1: <?php require_once('header.php'); ?>

 

 

Edit  php.ini

You can also edit the php.ini file and automatically start a session of every page.

Just search for this line:

   1: ; Initialize session on request startup.

   2: ; http://php.net/session.auto-start

   3: session.auto_start = 0

And change it to this:

   1: ; Initialize session on request startup.

   2: ; http://php.net/session.auto-start

   3: session.auto_start = 1

Restart php, or better yet all the services associated with it (Apache, mysql). Then create a new session without doing the session_start() code.

   1: $_SESSION['student'][] = array('idnum'=>2800570, 'name'=>'natsu');

Make another file and paste this code:

   1: print_r($_SESSION['student']);

See if it outputs the session that you created earlier. It should look like this:

   1: array([0]=>'idnum'=>2800570, 'name'=>'natsu');

Download youtube videos the easy way 2

If you remember, I’ve already posted a blog entry with the same title. As an update, I decided to make another one. Since the userscript that I mentioned back there isn’t working anymore. Tried and tested on Firefox 3.6 and Firefox 4. Officially it doesn’t work. I’m referring to  Youtube HD Ultimate userscript.

This time around. The userscript of choice is download youtube videos as mp4. Yeah, they’re not too creative in naming their userscript but it works. If you haven’t captured the first link here it is again.

Be sure to install Greasemonkey first and then restart Firefox then install the userscript. Access the youtube video that you want to download and from the bottom of youtube video you will see a new button called download. Just choose what format you want to download the video.

PSP cannot read memory stick

Are you having problems with your psp’s memory stick? Perhaps you have dropped it. Or you have accidentally removed it while playing a game. In this article I’ll share to you some of the things you can do to troubleshoot this problem.

  1. First you must have an option in your psp that says shutdown or restart. You can see that option by pressing ‘select’.
  2. Choose shutdown. Then press x or o depending on your configuration.
  3. Remove the memory stick from the psp.
  4. Turn on the psp using the usual method.
  5. Insert the memory stick.
  6. Press select then choose restart device.
  7. If you are lucky and your memory stick is not yet in bad shape then this trick might work.

How to transfer utorrent downloads

Sometimes when we are downloading something big. We think of using multiple computers to do the download. For example, using your laptop when at school. And using the desktop when at home. In this article, I’ll tell you how you can continue your utorrent downloads from one computer to another.

 

Requirements

  • Torrent File
  • Incomplete download
  • Removable media which can store the incomplete download.

 

Transfer downloads

I’ll assume that you already have a file which is currently downloading. So end the utorrent process from the task manager.

image

We need to do this so that you won’t get the file in use error.

Copy the file to your removable media (Flash drive, External Hard Drive,  Memory Stick, etc. ). Together with the .torrent file.

Open up the other computer. Make sure that you also have utorrent installed.

Open the .torrent file.

Change the download location to that of your external media.

Utorrent will do the rest. It will actually check first if the file already exists and if it exists then it will just continue the download.