SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    eCommerce specialist hotnuts21's Avatar
    Join Date
    Apr 2002
    Location
    Aberystwyth, UK
    Posts
    1,355
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Loading external Script

    I am trying to figure out the best way to trigger/load a script on another server.

    For security purposes, we want to send a string of ID's from one server to another.

    So the script www.mysite.com/script.php

    wants to send 1,2,3,4 to

    www.yoursite.com/script.php

    I suppose the Id's could be passed in the url as a parameter.

    However what function do I use to call/run a script on another server?

    Any ideas?
    Search & Rescue Aberystwyth Lifeboat
    CSS Tutorials/Guides

    Sitepoint signatures are not visible to Search Engines More info

  2. #2
    ✯✯✯ silver trophybronze trophy php_daemon's Avatar
    Join Date
    Mar 2006
    Posts
    5,284
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Saul

  3. #3
    eCommerce specialist hotnuts21's Avatar
    Join Date
    Apr 2002
    Location
    Aberystwyth, UK
    Posts
    1,355
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I thought about that but doesnt that load a file into a string?

    What I want is for the file on the other site to run and do its own thing on that server, it doesnt need to send any info to the original script, its a standalone script.

    So I just want to trigger it, as if I was opening it in a browser.
    Search & Rescue Aberystwyth Lifeboat
    CSS Tutorials/Guides

    Sitepoint signatures are not visible to Search Engines More info

  4. #4
    SitePoint Zealot
    Join Date
    Apr 2006
    Posts
    138
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i dont know what you really mean but as i have understod
    - use a query string the link will be in the mysite.com www.yoursite.com?id=1
    if you want some sequirty tell me and i will reply for you

  5. #5
    ✯✯✯ silver trophybronze trophy php_daemon's Avatar
    Join Date
    Mar 2006
    Posts
    5,284
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by hotnuts21
    I thought about that but doesnt that load a file into a string?

    What I want is for the file on the other site to run and do its own thing on that server, it doesnt need to send any info to the original script, its a standalone script.

    So I just want to trigger it, as if I was opening it in a browser.
    That will trigger the script as well. Accessing a remote script file is the same as directing your browser to it, the script is run and the output is sent back to requester.
    Saul

  6. #6
    SitePoint Wizard stereofrog's Avatar
    Join Date
    Apr 2004
    Location
    germany
    Posts
    4,324
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is correct, but if the response is large, this would be an unnecessary waste of resources. Besides that, remote file operations can be disabled in php configuration. CURL functions are generally more effective and reliable.

  7. #7
    eCommerce specialist hotnuts21's Avatar
    Join Date
    Apr 2002
    Location
    Aberystwyth, UK
    Posts
    1,355
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok many thanks, I will have a play and see what happens.

    Thanks for the help
    Search & Rescue Aberystwyth Lifeboat
    CSS Tutorials/Guides

    Sitepoint signatures are not visible to Search Engines More info


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
  •