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 6625687
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T21:48:13+00:00 2026-05-25T21:48:13+00:00

I have a one single PHP file in which first part: Server generates some

  • 0

I have a one single PHP file in which

first part: Server generates some output.

Second Part:uses the server generated output and submits the information.

what i have done:

File Name: abc.php

<?php
//first part
based on the information here server generates some output say:
111 success: id:104.123/12345678 |value:10000045

//second part
i will be using the output generated in the first part.
what i have done is something like this
$server_said = file_get_contents('http://http://abc.php');
//abc.php is the file name
if (preg_match_all('/104.123\:(\d*)/', $server_said, $matches))
//i want to display only 104.123/12345678 part  
{
$input = $matches[1];
} 
$xmlfile = '<?xml version="1.0" encoding="UTF-8"?>
<identifier identifierType="id">'.$input.'</identifier>'; 

?>

error: the intended result is not being displayed at $input, it is just staying as $input

How can i do that?

I am not sure about the code what i have written above might be wrong.

  • 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-25T21:48:14+00:00Added an answer on May 25, 2026 at 9:48 pm

    your regular expression fails, the correct one is:

    if (preg_match_all('/\d+\.\d+\/\d+/', $server_said, $matches))
    

    as well, when your output XML, u need to change your headers to what follows:

    header('Content-type: text/xml');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two different modules that need access to a single file (One will
In one of my first Cocoa applications I have just a single window with
Hi I have a web form that sends a string to one php file
I have cron job - php script which is called one time in 5
I have a PHP script which includes one or two other libraries it depends
I have the following file which process a single XML file and pushes it
I have a struts2 application with a single page that may show one of
Can you recommend a single downloadable video ( one that you have actually watched
I have an ASP.NET Site that has a single Master Page. On one of
I have one hibernate sequence, that generates all sequence-numbers in my app. When 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.