473,382 Members | 1,563 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.

include asp in php

Hello,

I'm writing a shoppingcart program in PHP. The website of our suplliers
webpage i written in ASP. He has very detailed info about his products, that
I want to include in my PHP page, I used include, require, readfile, even
something called Snoopy, but with everything that I try, I can't seem to get
the image inculed in the file. I just get the square with the cross in it,
like when you insert an image that doesn't exist.

Can anyone help me with this please?
Jul 17 '05 #1
14 11514
On Fri, 6 Feb 2004 13:07:16 +0100, "Recoura Tim" <ti*@e-port.be>
wrote:
Hello,

I'm writing a shoppingcart program in PHP. The website of our suplliers
webpage i written in ASP. He has very detailed info about his products, that
I want to include in my PHP page, I used include, require, readfile, even
something called Snoopy, but with everything that I try, I can't seem to get
the image inculed in the file. I just get the square with the cross in it,
like when you insert an image that doesn't exist.


If your supplier's ASP script is outputting an image, you should just
be able to use plain HTML:

<img src='http://www.example.com/script.asp' alt='Widget XYZ'>

If your supplier's ASP outputs other data that you want to process,
you should be able to make a HTTP request to your supplier's server
and parse the output.

If you need access to the ASP source code, you'll need to ask your
supplier for it.

--
David ( @priz.co.uk )
Jul 17 '05 #2
>
Hello,

I'm writing a shoppingcart program in PHP. The website of our suplliers
webpage i written in ASP. He has very detailed info about his products, thatI want to include in my PHP page, I used include, require, readfile, even
something called Snoopy, but with everything that I try, I can't seem to getthe image inculed in the file. I just get the square with the cross in it,like when you insert an image that doesn't exist.
If your supplier's ASP script is outputting an image, you should just
be able to use plain HTML:

<img src='http://www.example.com/script.asp' alt='Widget XYZ'>


That won't work either, if i usethe url in a webbrowser and everything is
fine, but when i use it in my script it won't work

If your supplier's ASP outputs other data that you want to process,
you should be able to make a HTTP request to your supplier's server
and parse the output.

if I'm correct include ('url.asp'); does an HTTP request to this page,
but it won't output the image

I read something about using header(); but I didn't found out how exactly to
use it, or more specific, how i should parse the html that is sent back.
If you need access to the ASP source code, you'll need to ask your
supplier for it.

--
David ( @priz.co.uk )

Jul 17 '05 #3
It's more a HTML problem, if the output of your supplier is an image, so you just insert it as an image.

Savut

"Recoura Tim" <ti*@e-port.be> wrote in message news:40**********************@news.skynet.be...
Hello,

I'm writing a shoppingcart program in PHP. The website of our suplliers
webpage i written in ASP. He has very detailed info about his products, that
I want to include in my PHP page, I used include, require, readfile, even
something called Snoopy, but with everything that I try, I can't seem to get
the image inculed in the file. I just get the square with the cross in it,
like when you insert an image that doesn't exist.

Can anyone help me with this please?

Jul 17 '05 #4
> Hello,

I'm writing a shoppingcart program in PHP. The website of our suplliers
webpage i written in ASP. He has very detailed info about his products, that I want to include in my PHP page, I used include, require, readfile, even
something called Snoopy, but with everything that I try, I can't seem to get the image inculed in the file. I just get the square with the cross in it,
like when you insert an image that doesn't exist.

Can anyone help me with this please?


I found a solution that works, it might not be the prettiest way to program,
but it gets the job done.

I use Iframes (html) the only "problem" that I have now is that it doesn't
seem to automaticaly resize the height of the frame, I just put "height =
3000" in the iframe, but now i have the possibility to have a lot of white
space on the bottom, or worse not made it big enough and have an extra
scrollbar on my page, and i don't want to make it noscroll, because then i
might loose some info on the page.

if i use height = 100% it's not what i need
Jul 17 '05 #5
On Fri, 6 Feb 2004 14:26:29 +0100, "Recoura Tim" <ti*@e-port.be>
wrote:
If your supplier's ASP script is outputting an image, you should just
be able to use plain HTML:

<img src='http://www.example.com/script.asp' alt='Widget XYZ'>
That won't work either, if i usethe url in a webbrowser and everything is
fine, but when i use it in my script it won't work

if I'm correct include ('url.asp'); does an HTTP request to this page,
but it won't output the image


From http://uk.php.net/include/ :

<quote>
The include() statement includes and evaluates the specified file.
</quote>

and (you can read ASP for PHP here):

<quote>
If the target server interprets the target file as PHP code, variables
may be passed to the included file using an URL request string as used
with HTTP GET. This is not strictly speaking the same thing as
including the file and having it inherit the parent file's variable
scope; the script is actually being run on the remote server and the
result is then being included into the local script.
</quote>

You don't want to include the image data in your PHP script. include()
inserts the specified file (or output thereof) and evaluates it as
normal.

The way to include images in a PHP script is to output <img> tags and
let the browser make a request for them. PHP generates HTML which is
rendered by the browser. You never see raw image data included within
HTML files.

--
David ( @priz.co.uk )
Jul 17 '05 #6
to insert image, you dont use include() use html even for asp generated image, dont forget the concept of http.

Savut

"Recoura Tim" <ti*@e-port.be> wrote in message news:40***********************@news.skynet.be...
Hello,

I'm writing a shoppingcart program in PHP. The website of our suplliers
webpage i written in ASP. He has very detailed info about his products, thatI want to include in my PHP page, I used include, require, readfile, even
something called Snoopy, but with everything that I try, I can't seem to getthe image inculed in the file. I just get the square with the cross in it,like when you insert an image that doesn't exist.


If your supplier's ASP script is outputting an image, you should just
be able to use plain HTML:

<img src='http://www.example.com/script.asp' alt='Widget XYZ'>


That won't work either, if i usethe url in a webbrowser and everything is
fine, but when i use it in my script it won't work

If your supplier's ASP outputs other data that you want to process,
you should be able to make a HTTP request to your supplier's server
and parse the output.


if I'm correct include ('url.asp'); does an HTTP request to this page,
but it won't output the image

I read something about using header(); but I didn't found out how exactly to
use it, or more specific, how i should parse the html that is sent back.
If you need access to the ASP source code, you'll need to ask your
supplier for it.

--
David ( @priz.co.uk )


Jul 17 '05 #7
Recoura Tim wrote:
Hello,

I'm writing a shoppingcart program in PHP. The website of our
suplliers webpage i written in ASP. He has very detailed info about
his products, that I want to include in my PHP page, I used include,
require, readfile, even something called Snoopy, but with everything
that I try, I can't seem to get the image inculed in the file. I
just get the square with the cross in it, like when you insert an
image that doesn't exist.

Can anyone help me with this please?


I found a solution that works, it might not be the prettiest way to
program, but it gets the job done.

I use Iframes (html) the only "problem" that I have now is that it
doesn't seem to automaticaly resize the height of the frame, I just
put "height = 3000" in the iframe, but now i have the possibility to
have a lot of white space on the bottom, or worse not made it big
enough and have an extra scrollbar on my page, and i don't want to
make it noscroll, because then i might loose some info on the page.

if i use height = 100% it's not what i need


Do you have any idea of how many people have iframes disabled? I know I
do...
Jul 17 '05 #8
And for a shopping cart, how much it's hurt to lost all these sales because they can't see it !!!!
ooch!!!!

Savut

"Agelmar" <if**********@comcast.net> wrote in message news:c0*************@ID-30799.news.uni-berlin.de...
Recoura Tim wrote:
Hello,

I'm writing a shoppingcart program in PHP. The website of our
suplliers webpage i written in ASP. He has very detailed info about
his products, that I want to include in my PHP page, I used include,
require, readfile, even something called Snoopy, but with everything
that I try, I can't seem to get the image inculed in the file. I
just get the square with the cross in it, like when you insert an
image that doesn't exist.

Can anyone help me with this please?


I found a solution that works, it might not be the prettiest way to
program, but it gets the job done.

I use Iframes (html) the only "problem" that I have now is that it
doesn't seem to automaticaly resize the height of the frame, I just
put "height = 3000" in the iframe, but now i have the possibility to
have a lot of white space on the bottom, or worse not made it big
enough and have an extra scrollbar on my page, and i don't want to
make it noscroll, because then i might loose some info on the page.

if i use height = 100% it's not what i need


Do you have any idea of how many people have iframes disabled? I know I
do...

Jul 17 '05 #9
Yeah, me too, I bet at least 40-50% of the people dont have iframe support on their browser, It's doesn't work on Netscape, Opera,
Mozilla, Konqueror and many more... As far as I know, there is only IE that support iframe, and he will surely remove it soon on the
next versions.

Savut

"Agelmar" <if**********@comcast.net> wrote in message news:c0*************@ID-30799.news.uni-berlin.de...
Recoura Tim wrote:
Hello,

I'm writing a shoppingcart program in PHP. The website of our
suplliers webpage i written in ASP. He has very detailed info about
his products, that I want to include in my PHP page, I used include,
require, readfile, even something called Snoopy, but with everything
that I try, I can't seem to get the image inculed in the file. I
just get the square with the cross in it, like when you insert an
image that doesn't exist.

Can anyone help me with this please?


I found a solution that works, it might not be the prettiest way to
program, but it gets the job done.

I use Iframes (html) the only "problem" that I have now is that it
doesn't seem to automaticaly resize the height of the frame, I just
put "height = 3000" in the iframe, but now i have the possibility to
have a lot of white space on the bottom, or worse not made it big
enough and have an extra scrollbar on my page, and i don't want to
make it noscroll, because then i might loose some info on the page.

if i use height = 100% it's not what i need


Do you have any idea of how many people have iframes disabled? I know I
do...

Jul 17 '05 #10
On Fri, 6 Feb 2004 10:25:06 -0500, "Savut" <we***@hotmail.com> wrote:
Yeah, me too, I bet at least 40-50% of the people dont have iframe support on their browser, It's doesn't work on Netscape, Opera,
Mozilla, Konqueror and many more... As far as I know, there is only IE that support iframe, and he will surely remove it soon on the
next versions.


Why do you think MS will remove IFrame support from IE?

Using an Iframe seems to be a rather bumpy solution to what appears to
be a simple problem. I don't see why using <img> wouldn't work. Unless
there's something the OP hasn't mentioned, or I have misunderstood the
problem.

Surely whatever is in the IFrame could just be included as part of the
page anyway?

--
David ( @priz.co.uk )
Jul 17 '05 #11
On Fri, 6 Feb 2004 13:07:16 +0100, "Recoura Tim" <ti*@e-port.be>
wrote:
Hello,

I'm writing a shoppingcart program in PHP. The website of our suplliers
webpage i written in ASP. He has very detailed info about his products, that
I want to include in my PHP page, I used include, require, readfile, even
something called Snoopy, but with everything that I try, I can't seem to get
the image inculed in the file. I just get the square with the cross in it,
like when you insert an image that doesn't exist.


Are you sending the correct Content-Type headers (image/jpeg etc)?

You need to let the browser know that the data is an image.

--
David ( @priz.co.uk )
Jul 17 '05 #12
On Fri, 06 Feb 2004 16:07:32 +0000, David Mackenzie <me@privacy.net>
wrote:
On Fri, 6 Feb 2004 10:25:06 -0500, "Savut" <we***@hotmail.com> wrote:
Yeah, me too, I bet at least 40-50% of the people dont have iframe support on their browser, It's doesn't work on Netscape, Opera,
Mozilla, Konqueror and many more... As far as I know, there is only IE that support iframe, and he will surely remove it soon on the
next versions.


Why do you think MS will remove IFrame support from IE?

Using an Iframe seems to be a rather bumpy solution to what appears to
be a simple problem. I don't see why using <img> wouldn't work. Unless
there's something the OP hasn't mentioned, or I have misunderstood the
problem.

Surely whatever is in the IFrame could just be included as part of the
page anyway?


Actually, I'll wager the ASP output contains *relative* links to
images which of course don't work when included on a page in a
different domain ;-)

--
David ( @priz.co.uk )
Jul 17 '05 #13
Well actually, only IE and Netscape 6 support iframe, also it was just supported by the w3c in html version 4. It's not wide supported right now and also, iframe is hated by most surfer because of its difficulte to have a full overview of a page. Also both browser handle iframe diffrently. And also it is often disabled by most users. Iframe is now in his pre-deprecated stage, newly doctype like xhtml doesn't support it.

Savut

"David Mackenzie" <me@privacy.net> wrote in message news:g2********************************@4ax.com...
On Fri, 06 Feb 2004 16:07:32 +0000, David Mackenzie <me@privacy.net>
wrote:
On Fri, 6 Feb 2004 10:25:06 -0500, "Savut" <we***@hotmail.com> wrote:
Yeah, me too, I bet at least 40-50% of the people dont have iframe support on their browser, It's doesn't work on Netscape, Opera,
Mozilla, Konqueror and many more... As far as I know, there is only IE that support iframe, and he will surely remove it soon on the
next versions.


Why do you think MS will remove IFrame support from IE?

Using an Iframe seems to be a rather bumpy solution to what appears to
be a simple problem. I don't see why using <img> wouldn't work. Unless
there's something the OP hasn't mentioned, or I have misunderstood the
problem.

Surely whatever is in the IFrame could just be included as part of the
page anyway?


Actually, I'll wager the ASP output contains *relative* links to
images which of course don't work when included on a page in a
different domain ;-)

--
David ( @priz.co.uk )

Jul 17 '05 #14
Did you try Data Scraping?? use the PHP command fopen() to open a URL
for the ASP script and then scrape contents into a discernible image
format.
Also look into the GD Library functions for creating an Image resource
object link.

Phil

David Mackenzie <me@privacy.net> wrote in message news:<1q********************************@4ax.com>. ..
On Fri, 6 Feb 2004 14:26:29 +0100, "Recoura Tim" <ti*@e-port.be>
wrote:
If your supplier's ASP script is outputting an image, you should just
be able to use plain HTML:

<img src='http://www.example.com/script.asp' alt='Widget XYZ'>
That won't work either, if i usethe url in a webbrowser and everything is
fine, but when i use it in my script it won't work

if I'm correct include ('url.asp'); does an HTTP request to this page,
but it won't output the image


From http://uk.php.net/include/ :

<quote>
The include() statement includes and evaluates the specified file.
</quote>

and (you can read ASP for PHP here):

<quote>
If the target server interprets the target file as PHP code, variables
may be


passed to the included file using an URL request string as used with HTTP GET. This is not strictly speaking the same thing as
including the file and having it inherit the parent file's variable
scope; the script is actually being run on the remote server and the
result is then being included into the local script.
</quote>

You don't want to include the image data in your PHP script. include()
inserts the specified file (or output thereof) and evaluates it as
normal.

The way to include images in a PHP script is to output <img> tags and
let the browser make a request for them. PHP generates HTML which is
rendered by the browser. You never see raw image data included within
HTML files.

Jul 17 '05 #15

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

Similar topics

43
by: steve | last post by:
I am quite frustrated with php’s include, as I have spent a ton of time on it already... anyone can tell me why it was designed like this (or something I don’t get)? The path in include is...
0
by: Tom Lee | last post by:
Hi, I'm new to .NET 2003 compiler. When I tried to compile my program using DEBUG mode, I got the following errors in the C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7 \include\xdebug...
60
by: Derrick Coetzee | last post by:
It seems like, in every C source file I've ever seen, there has been a very definite include order, as follows: - include system headers - include application headers - include the header...
9
by: zolli | last post by:
Hi, I've been banging my head against this for a while now. Hoping someone here can shed some light on what's going on. On including stdlib.h in a file, I'm seeing the following errors: ...
5
by: David Mathog | last post by:
One thing that can make porting C code from one platform to another miserable is #include. In particular, the need to either place the path to an included file within the #include statement or to...
1
by: Minh | last post by:
I've just installed VS.NET 2003 on my Athlon XP 1800+. However I couldn't get any project with STL includes to compile even if I create a new empty project (and added #include <string>). It gave me...
1
by: ya man | last post by:
when i use #include <iostream.h> in some files i get lots of error messages of the kind 'ambiguous symbol this is solved when i use #include <iostream why is that ? and can i use #include...
3
by: Arpi Jakab | last post by:
I have a main project that depends on projects A and B. The main project's additional include directories list is: ...\ProjectA\Dist\Include ...\ProjectB\Dist\Include Each of the include...
14
by: Jon Rea | last post by:
I am currently cleaning up an application which was origainlly hashed together with speed of coding in mind and therefore contains quite a few "hacky" shortcuts. As part of this "revamping"...
7
by: Giancarlo Bassi | last post by:
Please, what are here the 11 include files (found over the internet)? */mozzarella.c /* #include #include #include #include #include #include
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
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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.