Taking info from another page

They have: 48 posts

Joined: Feb 2002

When I first started doing web pages and was trying to learn all about it I came across some kind of scripting that allowed information to be taken from another page. However at this time I was with something the equivalent of tripod that would not allow this type of scripting and also I was very much more a novice than I am now. I now have a host that could facilitate this script, but since this was a few years ago I haven't a clue where that site that told me how to do it was. So can anyone help. In the example they gave it takes some text from a site like ABC whats on TV and so the information showed what was on TV by taking it from another site. I think it was perl or PHP that they used, but I am not sure. The time has come where I could really use that script and I would have some good places I could use it (expecially on my forums.)

Go to www.youwantittryhere.com for games, chat, free e-mail and much much more

openmind's picture

He has: 945 posts

Joined: Aug 2001

What language are you using? If ColdFusion then the link would run something like this:

  <a href="newpage.cfm?Query=YouQueryString">New Page</a>
'

What's happening here is that the page the link is on, the referring page, is sending a variable "Query" to the new page. The new page is then taking this variable and using it to manipulate the page results based on the variable through a query or whatever.

Does this help?

Mark Hensler's picture

He has: 4,048 posts

Joined: Aug 2000

What you want is called "Screen Scrapping."
You can do a google search or check these threads:

http://webmaster-forums.net/showthread.php?threadid=14505
http://webmaster-forums.net/showthread.php?threadid=17280

Mark Hensler
If there is no answer on Google, then there is no question.

They have: 48 posts

Joined: Feb 2002

Mark, you said in one of the threads that you emailed the guy with how to do it. I am hardly able to read his email to do it. It seems that you don't wish to post it because you don't want people nicking content from others. Fair enough, I take your point, but the reason I want it is to kind of take information from my own site if that makes any sense. I need it to take information from another site I own you see so I am allowed to do it. I'll do a search for this scraping thing and for this page ripper, but could you also send me an email how to do it as well.

[email protected] is the email. Thanks alot.

Go to www.youwantittryhere.com for games, chat, free e-mail and much much more

Mark Hensler's picture

He has: 4,048 posts

Joined: Aug 2000

I don't have a copy of that email anymore. I basically explained that you need to pattern match the source code for the information you wish to grab. If your language of choice is PHP, then you should read up on and te function preg_match().

Some notes to keep in mind...
- If the target site changes their source code, your script will need updated.

- If you have access to the target site's source, put comment tags around your desired text. This will make it easier to grab with a REGEX statement.

- If the desired text is stored in a DB, gain access to the DB. It's easier to query a DB than do a screen scrap.

Mark Hensler
If there is no answer on Google, then there is no question.

They have: 48 posts

Joined: Feb 2002

Listen, my knowledge of PHP is neglegeble, but if you could just send me a sample page that say takes the information from one site (you choose - you can get it to take stuff from my own site - higherengineranking.com/ywith if you want) and then I can adapt it to my needs. Could you please help?????

If you can help me I would add your link to my website.

Oh yeah this reminds me, zollet, give me your link again since you helped me with the hotmail window thingy.

Go to www.youwantittryhere.com for games, chat, free e-mail and much much more

Mark Hensler's picture

He has: 4,048 posts

Joined: Aug 2000

Have you tried searching HotScripts.com or Google?

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.