You are here: Re: [PHP] possible to get a function from another domain « PHP « IT news, forums, messages
Re: [PHP] possible to get a function from another domain

Posted by Rory Browne on 08/26/05 16:34

Ummm, what exactly is your solution? What did you go with, or what are
you going with?

On 8/24/05, Gustav Wiberg <gustav@varupiraten.se> wrote:
> Hi there!
>
> Thanx for the help!
>
> And everybody else that helped me with the solution of course! :-)
>
> /G
> @varupiraten.se
>
> ----- Original Message -----
> From: "Rory Browne" <rory.browne@gmail.com>
> To: "Jim Moseby" <JMoseby@nrbindustries.com>
> Cc: <php-general@lists.php.net>
> Sent: Tuesday, August 23, 2005 10:21 PM
> Subject: Re: [PHP] possible to get a function from another domain
>
>
> I withdraw my information in my earlier post.
>
> I was in a cybercafe in a hurry - and didn't have time to consider
> what was said, nor what I was saying myself.
>
> What I said before has little or not merit.
>
> You can make an experimental interface, and parse the html without the
> other domain owners co-operation(although it may be considered rude to
> do it without his consent). Your interface breaks when he changes his
> system.
>
> You can get him to create an XML page, that you can parse, if you have
> his co-operation, or you could possibly get him to create an XML-RPC
> or SOAP interface to his site.
>
> On 8/23/05, Jim Moseby <JMoseby@nrbindustries.com> wrote:
> > > [snip]
> > > Can I use require with http?
> > >
> > > My domain: www.varupiraten.se
> > >
> > > Other domain: www.webshop2.se
> > >
> > > Does this kind of code work?
> > >
> > > Code for my domain:
> > > <?php
> > > require(http://www.webshop2.se/externfunctions.php);
> > > $x = getValueFromProduct('Inno AX5000'); //This function
> > > retrieves price
> > >
> > > from webshop2.se
> > > ?
> > > [/snip]
> > >
> > > Have you tried it?
> > >
> > > Really, unless you own the the other domain and have a way to
> > > access the
> > > data, you really cannot do this without some sort of screen
> > > scraping or
> > > URL munging. Let us say that you know the product listing for
> > > the other
> > > domain is something like
> > >
> > > http://www.webshop2.com/productInfo.php?product=Inno_AX5000
> > >
> > > You could retrieve that data and manipulate it.
> > >
> >
> > But even if you did, you're giving the other guy the power to break your
> > site. All he has to do is change the URL or the format of the page, and
> > BOOM, your site croaks.
> >
> > So a relevant question is: "Do you have control of the other site, or at
> > least the cooperation of the other site's owner?"
> >
> > JM
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
> --
> No virus found in this incoming message.
> Checked by AVG Anti-Virus.
> Version: 7.0.338 / Virus Database: 267.10.14/79 - Release Date: 2005-08-22
>
>
>

 

Navigation:

[Reply to this 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

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