Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Whenever you open websites like downloadsafe.org there is a pop-up that you have to fill a survey. Till the time you don't fill that survey out it keeps sending request back to a server that gives a response "no" you can see these requests if you activate the firebug plug-in.

So I thought that I would download the entire code of the page and then edit a few lines in the code where it checks for the status and doesn't proceed until a yes is received. But I am not able to locate that particular line of code where the developer has put a check.

I filled the survey three-four times but by then the request had timed out so now I have to find some other way to get these files. Has anyone done this kind stuff before. I am tagging both javascript and PHP because I believe the target code is in either languages.

share|improve this question
5  
Protip: If warez, porn, etc. are hidden behind one of those sites they are usually fake. –  ThiefMaster Jul 21 '13 at 7:56

1 Answer 1

It's not possible.

You cannot download the PHP source code of a site written in PHP, unless

  • the site's code was made open source, or
  • the server was improperly configured to serve you the PHP code in plaintext without being interpreted (this would constitute a huge security flaw)

Now, even if you had the PHP code, you'd still need to run the site itself, which—like most of PHP sites on the web—also rely on a database that runs in the background. You'd have to set up this database first, maybe even with data that is needed to run the site.

Furthermore, you say that there are continuous requests to the host. Those are probably AJAX requests through JavaScript. JavaScript follows the concept of Same Origin Policy, meaning that you can't just host the "entry" site yourself—even if you had its entire source code—and then send requests to the original server, hoping that it would give you the same responses, or even allow you access. Read more about this here.

share|improve this answer
1  
You forgot "you hack the server" in your list ;) –  ThiefMaster Jul 21 '13 at 7:55
    
@slhck I guess I wont get the files now.. But thanks for the answer. –  kapil chhattani Jul 22 '13 at 8:46

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.