473,382 Members | 1,258 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Get code from another site

Guys

Not sure if this is possible but I'd appreciate a bit of info please

I would like to (lets just call it) borrow a piece of code from another
website. The website in question is published totally in Microsoft
Frontpage, some very ancient version with totally flat HTML. (Not my site,
not under my control. The owners have no interest in changing the site)

Is it possible in PHP to take a piece of code from this website and
reference it on my page, I was thinking of something along the lines of:

GREP from sitename | referencing this page | inside these markers

I've spoken with my web developers and they tell me I can use Iframe tags or
RSS feeds, both of which I do not believe will allow me to accomplish this

Thanks in advance

Steve
Jul 11 '07 #1
3 1912
"Steve Ray" <no******@all.comwrote in
news:f7**********@north.jnrs.ja.net:
Guys

Not sure if this is possible but I'd appreciate a bit of info please

I would like to (lets just call it) borrow a piece of code from
another website. The website in question is published totally in
Microsoft Frontpage, some very ancient version with totally flat HTML.
(Not my site, not under my control. The owners have no interest in
changing the site)

Is it possible in PHP to take a piece of code from this website and
reference it on my page, I was thinking of something along the lines
of:

GREP from sitename | referencing this page | inside these markers

I've spoken with my web developers and they tell me I can use Iframe
tags or RSS feeds, both of which I do not believe will allow me to
accomplish this
fread();
http://ca.php.net/fread
or
file_get_contents();
http://ca.php.net/manual/en/function...t-contents.php
Will let you get the content/source of a webpage...
Jul 11 '07 #2
Message-ID: <f7**********@north.jnrs.ja.netfrom Steve Ray contained
the following:
>Is it possible in PHP to take a piece of code from this website and
reference it on my page, I was thinking of something along the lines of:

GREP from sitename | referencing this page | inside these markers
LOL, that would have been covered in the follow-up PHP course Steve. Had
there been one. :-(

It's called screen scraping. Experiment with this

$html_content = implode('', file('http://www.example.com'));
$begin="begin marker";
$end="end marker";

preg_match("/$begin(.*)$end/i", $html_content, $match[]);

print_r($match);

--
Regards,

Geoff Berrow
Jul 11 '07 #3
Steve Ray wrote:
Guys

Not sure if this is possible but I'd appreciate a bit of info please

I would like to (lets just call it) borrow a piece of code from another
website. The website in question is published totally in Microsoft
Frontpage, some very ancient version with totally flat HTML. (Not my site,
not under my control. The owners have no interest in changing the site)

Is it possible in PHP to take a piece of code from this website and
reference it on my page, I was thinking of something along the lines of:
If your server allows it, try fsockopen.

http://uk2.php.net/manual/en/function.fsockopen.php
Jul 11 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

18
by: John Dalberg | last post by:
Hello I have a login form on a page that should post the data to a non Windows server and upon successful authentication, the browser needs to show the secodn url. I did the form post, got...
242
by: James Cameron | last post by:
Hi I'm developing a program and the client is worried about future reuse of the code. Say 5, 10, 15 years down the road. This will be a major factor in selecting the development language. Any...
53
by: Cardman | last post by:
Greetings, I am trying to solve a problem that has been inflicting my self created Order Forms for a long time, where the problem is that as I cannot reproduce this error myself, then it is...
109
by: Andrew Thompson | last post by:
It seems most people get there JS off web sites, which is entirely logical. But it is also a great pity since most of that code is of such poor quality. I was looking through the JS FAQ for any...
171
by: tshad | last post by:
I am just trying to decide whether to split my code and uses code behind. I did it with one of my pages and found it was quite a bit of trouble. I know that most people (and books and articles)...
3
by: Manohar Kamath | last post by:
Hello all, Consider that you have an ASP.NET application you have deployed as www.somesite.com. If I would like to create an intranet site with the same code (say http://intranetsite/ for use...
17
by: Bruno | last post by:
I have a feature that is hosted on a different domain from the primary one in a frame, and need to retain values in a cookie. example: A web page at one.com contains a frame which has a page...
27
by: David Golightly | last post by:
This is just a quick poll for all you web devs out there: What browsers do you test on/are concerned about compatibility with? Obviously, you're going to test on current-generation browsers such...
4
by: mattdaddym | last post by:
Hi all, I've taken a couple of hours to read what is available, and I still cannot figure out how to do a very simple task in vb .net...lol. All I need to do is read an xml file and parse out...
0
by: toyin | last post by:
hello, pls help look through this code its not inserting the record in dataset into the another database. i want to insert the row in the dataset into another table in another database. pls help....
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.