Page 1 of 1

I just want my question answered... thanks!

Posted: Tue Jul 21, 2009 8:42 am
by prue_
is it possible to pull some contents of web page into another using php or javascript?? for example I have a http://www.domain.com/report.php that displays a list of report: eg
report1 title
report1 description
report1 link to complete report1

report2 title
report2 description
report2 link to complete report2

I have a left widget and I want to randomly display the above info in this widget.
can I pull the data from /report.php and insert in this widget??

thanks.

Re: I just want my question answered... thanks!

Posted: Tue Jul 21, 2009 9:14 am
by jayshields
Yes, you can.

Re: I just want my question answered... thanks!

Posted: Tue Jul 21, 2009 9:17 am
by spider.nick
jayshields wrote:Yes, you can.
:rofl: :bow: :rofl:

Nick

Re: I just want my question answered... thanks!

Posted: Tue Jul 21, 2009 9:42 am
by prue_
ok, so my 2nd question now is how?? can you show me some code on how to do this? thanks!

Re: I just want my question answered... thanks!

Posted: Tue Jul 21, 2009 9:56 am
by alex.barylski
No, it usually goes against the web sites ToS, stealing their content.

Use an RSS feed or similar API for ther web site in question and use that it's easy.

Re: I just want my question answered... thanks!

Posted: Tue Jul 21, 2009 10:01 am
by prue_
but the web page I'm talking about is included in my website as well.. would that be still against the website Tos??

Re: I just want my question answered... thanks!

Posted: Tue Jul 21, 2009 11:36 am
by jackpf
I thought you just wanted your question answered.

Re: I just want my question answered... thanks!

Posted: Tue Jul 21, 2009 11:45 am
by prue_
yes, but the answer is yes that's why I need to make a follow up question.. :lol:

Re: I just want my question answered... thanks!

Posted: Tue Jul 21, 2009 11:47 am
by jackpf
Well...your subject is incorrect then :P

Re: I just want my question answered... thanks!

Posted: Tue Jul 21, 2009 12:42 pm
by jayshields
Look at file_get_contents() and cURL.

Re: I just want my question answered... thanks!

Posted: Wed Jul 22, 2009 12:00 am
by prue_
I have another question...
Can I just call the page (e.g. http://www.otherdomain.com/News.php?ksfkshf), which is an external link and strip of its header and footer, and display only the main content??

would this be possible? thanks

Re: I just want my question answered... thanks!

Posted: Wed Jul 22, 2009 12:14 am
by prue_
no it's not hacking... the external site I'm referring to is my website as well... I just don't want to grab all the data there since it is just a workaround.