Jump to content

syntax help with variable


tomdchi

Recommended Posts

I have a script that contains:

 

$systemurl = $_POST['systemurl'];

 

this would be just https://domain.com/

 

later I have:

 

$url = "https://domain.com/includes/api.php";

 

How would I change one of these so that $url would get info from $systemurl and also have /includes/api.php-i.e.,

 

$url = {$systemurl}includes/api.php

 

I have this script working with $url domain completed but this will be used for more than one domain so I need it to pull from the post variable.

Link to comment
Share on other sites

The variable in question is from a post that contains the system url not of my server but a remote server from where the post came from.  This script uses curl to talk back to the remote site hence the need for it to know where it originated from.

 

When I use $url = "https://remotedomain.com/api.php"; it works fine but I need it to get the url information from the $systemurl variable and append it with /api.php so I can use this script for more than one domain.  Can this be done?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.