SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    ko pročita magarac :) boccio's Avatar
    Join Date
    Oct 2003
    Location
    belgrade
    Posts
    354
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Invoking script from another server

    Hi all,

    Is there a way to accomplish this? I need to call a PHP script from HTML file on different server. The server from which a call is made might or might not have PHP, so having PHP file that includes script with cURL or fopen() is not an option. The objective is to have result (output) of the script embedded in target HTML file.

    What can I use from HTML file to fetch output of PHP script from another server? Suppose SSI can't do that...Can <IFRAME> be used?

    Any suggestions welcome.
    Vivvo CMS - Web publishing at your fingertips
    Mile voli disko, a ja belo kolumbijsko

  2. #2
    FreeBSD The Power to Serve silver trophy pippo's Avatar
    Join Date
    Jul 2001
    Location
    Italy
    Posts
    4,514
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    example.com/.htaccess
    Code:
    RewriteEngine On
    
    RewriteRule ^my_file\.html$ http://example.net/my_file.php [P,L]
    you need to have mod_rewrite and mod_proxy loaded.

    So even if example.com does not support php then calling
    example.com/my_file.html
    will call
    example.net/my_file.php
    but the address bar will show the .html


    is it what you wanted ?



    Andrea
    Mr Andrea
    Former Hosting Team Advisor
    Former Advisor of '03


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •