Reply to Re: saving content from another site

Your name:

Reply:


Posted by Steve on 02/21/07 20:27

"javelin" <google.1.jvmail@spamgourmet.com> wrote in message
news:1172088195.195327.10520@l53g2000cwa.googlegroups.com...
| On Feb 21, 12:29 pm, "Steve" <no....@example.com> wrote:
| > "javelin" <google.1.jvm...@spamgourmet.com> wrote in message
| >
| > news:1172079828.170362.243730@l53g2000cwa.googlegroups.com...
| > | fopen fails to produce anything but a blank page, as I expected it
| > | would when I "rtfm". The target site is not mine, and I can't hope to
| > | have it opened for access anytime soon.
| >
| > you don't need to have it 'opened for access'. you aren't getting source
| > code from them, just html...which they offer publically.
| >
| > | It is, essentially, a blog,
| >
| > doesn't matter
| >
| > | and I need to get the posts off of a certain category every hour or
| > | so.
| >
| > write your script (the one where you will use fopen because you rtfm)
and
| > put it on a cron job or windows scheduled task.
| >
| > | I just needed some PHP or CGI code that can automatically import
| > | the html from a supplied URL, then display it. From there, I can work
| > | out a means to manipulate the resulting page.
| >
| > painfully, but probably so. just kidding. ;^)
| >
| > | Any recommendations from the manual or elsewhere I can look into?
| >
| > fopen
| > fread
| > stream_get_meta_data
| > http_response_header
| > (hell, even file_get_contents works)
|
| Thanks for all the refs. I'll get to reading again, and let you know
| if my eyes get crossed up in a knot (won't be the first time).


look, if you don't have to log in to get to the forum/post you wanna see,
then just do:

echo file_get_contents($url);

that way you can see the html that was at $url. other than that, you can
parse the result of the function, store it, whatever. i've borrowed *many* a
'secure' site's functionality using only that function alone. it's great to
'borrow' the ability to get barcoded images from someone else's site...or
'borrow' pie, bar, or other chart images doing the same...or...whatever.
it's not hard. even hacking 'secure' sites is suprisingly easily done.
however, you don't even have to go to great lengths here since they are
giving you the html knowingly and freely. ;^)

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация