Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6241009
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T11:40:40+00:00 2026-05-24T11:40:40+00:00

I need to include to my php script external php code which is situated

  • 0

I need to include to my php script external php code which is situated for example by link http://site.com/code.php How could I do it? I tryed all ways which I found in internet but no one works. All methods are good to include text but not php script.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T11:40:41+00:00Added an answer on May 24, 2026 at 11:40 am

    You can only include the code if it is served as text: otherwise everyone would be able to see / use your code.

    So the options you have:

    • Get the file trough ftp and include it with include or require
    • Get the file in plaintext, by serving .php files on “site.com” as text. This is ofcourse not a good idea, as everyone could see your source from there.
    • Put the file on the same server as the script that wants to include it.
    • If you need just the file to be ‘run’, you can curl it. You won’t get the source (cannot use its functions etc) but any actions it performs (make file? add something to the database) will be run.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need a way to include an external XML file in PHP which does
I use this tooltip script on my site: http://craigsworks.com/projects/simpletip/ The problem is that I
I am working on a PHP script which involves me including several external PHP
How to include multiple paths when a PHP script is called? For example, I
I'm writing a PHP script that autoconfigures a device over Telnet, and I need
I have created a custom PHP script which uploads information submitted by a form
I've been writing: include('a.php') include('b.php') etc. in my script to include to use functions
I need to print the html transformed output of my php script in a
I need to send 500 Internal Server Error from an PHP script under certain
I am using an encoded PHP script, which requires SSL support for CURL. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.