|
[PHP] Get source of another webpage
|
|
11-17-2009, 10:29 AM
Post: #1
|
|||
|
|||
|
[PHP] Get source of another webpage
This code will get the source of another webpage. Some php functions are limited to only the servers own webpages, but file_get_contents is not. Post variables can be included in the array at the top of the code, and get variables can be passed in the url. Note that this will get the resulting source code of another webpage. You can't get the server side php code of another site.
Code: <?phpFree image hosting at http://myph.us. |
|||
|
11-17-2009, 11:06 AM
Post: #2
|
|||
|
|||
|
RE: [PHP] Get source of another webpage
This is neat, but what is the difference between this and right-click save-as?
|
|||
|
11-17-2009, 08:06 PM
Post: #3
|
|||
|
|||
RE: [PHP] Get source of another webpage
(11-17-2009 11:06 AM)daminkz Wrote: This is neat, but what is the difference between this and right-click save-as? That is if you want to have that on your page in form "Save As" or sth like that ! @ajcis55 Good use of POST, this can really help, and i can see streams there which is good for big pages. There's a fine line between genius and insanity. I have erased this line. Oscar Levant There's a fine line between an administrator and black hat hacker. I have erased this line. Dr DEBCOL |
|||
|
11-21-2009, 12:42 PM
Post: #4
|
|||
|
|||
|
RE: [PHP] Get source of another webpage
daminkz,
This code is for use when you have a php site and need to get the source of another for whatever reason. So, if your website needs to see what's on "http://www.google.com/search?q=pro9ramming" and see how many results there are, it could parse the page until it finds what it's looking for and use it within the website. Save-as is a client side thing for users, this is for the server. Free image hosting at http://myph.us. |
|||
|
« Next Oldest | Next Newest »
|





