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

  • Home
  • SEARCH
  • 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 1025031
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T11:52:01+00:00 2026-05-16T11:52:01+00:00

I am trying to have a php script that displays a url with user

  • 0

I am trying to have a php script that displays a url with user data in it. The script is shown as follows.

<?php 
$url = "localhost/" + $_GET['type'] + "/" + str_replace(' ','%20',$_GET['message']) + "/";
print $url;
// create curl resource 
$ch = curl_init(); 
// set url 
curl_setopt($ch, CURLOPT_URL, $url); 
curl_setopt($ch, CURLOPT_PORT, 6677); 
//return the transfer as a string 
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
// $output contains the output string 
$output = curl_exec($ch); 
// close curl resource to free up sylstem resources 
curl_close($ch);

if ($output) { 
print $output;
}
else
{
print 'FAILED';
}
?>

This is part of a game that I am trying to make where the people talk using A.L.I.C.E, written in AIML (Artificial Intellagence Markup Language). I am using PyAIML. It needs to connect to a Python server on a different port.

The says when a request is received and it does not say it is getting a request at the when I load the page. I used tamper data to remove ALL request headers and it still worked with Firefox.

  • 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-16T11:52:02+00:00Added an answer on May 16, 2026 at 11:52 am

    The problem is with your first line. You’re using the numeric addition operator + when you want to use the string concatenation operator instead .

    Before:

    $url = "localhost/" + $_GET['type'] + "/" + str_replace(' ','%20',$_GET['message']) + "/";
    

    After:

    $url = "http://localhost/" . $_GET['type'] . "/" . str_replace(' ','%20',$_GET['message']) . "/";
    

    Also, note it couldn’t hurt to explicitly declare the protocol portion of the URL.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a php script that I'm trying to pull some data from a
I have a PHP upload script and am trying to make it so that
I have a basic PHP script that displays the file contents of a directory.
Trying to have my PHP script return some SQL table queries. Here's my script
I am trying to make a Postgres PHP backup script. I have downloaded one
I have a php/mysql poll that I'm trying to modify. It sets a unique
I am trying to make clean url with htaccess I have a profile.php page
I have a problem trying to hide .php extension from the url I have
I have a PHP script that runs once a day, and it takes a
I have been trying to make a user login page that, when the user

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.