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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T15:06:22+00:00 2026-05-22T15:06:22+00:00

update: the answer from virtualeyes (below) looks pretty nice: but now a bit code-sanititzing

  • 0

update: the answer from virtualeyes (below) looks pretty nice: but now a bit code-sanititzing should be applied:

$ch = curl_init("http://www.aktive-buergerschaft.de/buergerstiftungsfinder");
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);  
$buffer = curl_exec($ch);
curl_close($ch);
$result = explode(",", $buffer);
print_r($result); 

and with the corrections we have something like the following:

$ch = curl_init("http://www.aktive-buergerschaft.de/buergerstiftungsfinder");
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);  
$buffer = curl_exec($ch);
curl_close($ch);
$result = explode(",", $buffer);
foreach($result as $k => $v) {echo $k." ".$v} 
if $v is itself an array) 
   // print_r($result);

see the additional infos from virtualeye… [a big thanks to Virtualeye]

yes, print_r just prints out the response, 
in this case presumably as an array (if viewing the output in web browser, 
do view-source to see structured array). 
Depending on num dimensions, we could do, 
foreach($result as $k => $v) {echo $k." ".$v} 
to view and work with data 
(adding sub foreach loops accordingly; i.e. 
if $v is itself an array) 

here the old text from the original question:

today i want to apply Curl on a very simple example that gets a HTTP page – review
in order to harvest the data of this pretty simple

see this totally easy page: http://www.aktive-buergerschaft.de/buergerstiftungsfinder
here we have a list of Foundations: We can see a bunch (approx 1000 records on Foundations). Well – my intention is to store the data in a locally database (favourite db is MySQL):

here is my simple approach – what is missing are two parts: The processing of the results and the storing of the results of the parser – into the MySQL-DB. This part goes somewhat over my head.

Well the result of the Fetching with Curl should be given to arrays – shouldn ´t it!? If someone can help me here i would be glad!

<?php
//
// A very simple example that gets a HTTP page.
//

$ch = curl_init();

curl_setopt ($ch, CURLOPT_URL, "http://www.aktive-buergerschaft.de/buergerstiftungsfinder");
curl_setopt ($ch, CURLOPT_HEADER, 0);


curl_exec ($ch);

curl_close ($ch);

// well here i want to put the results into an array... [multidimensioal or not !?! ]

?>

see the example here on this page: (at the top)

Bürgerstiftung Lebensraum Aachen
rechtsfähige Stiftung des bürgerlichen Rechts
Ansprechpartner: Hubert Schramm
Alexanderstr. 69/ 71
52062 Aachen
Telefon: 0241 - 4500130
Telefax: 0241 - 4500131
Email: info@buergerstiftung-aachen.de
www.buergerstiftung-aachen.de
>> Weitere Details zu dieser Stiftung 

The link “Weitere Details zu dieser Stiftung” which is: in english
More details to this Foundation”

this link has to be followed and the results (also) to be parsed. If you follow the link then you see: There are some additional infos that should be stored too!

Well – what is needed now: I need to have the details for the arrays Can any body enlarge the codebits that can be seen above – and give me a hint!? I look forward to this…

  • 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-22T15:06:23+00:00Added an answer on May 22, 2026 at 3:06 pm

    Something like this should work for you:

    $ch = curl_init("http://www.aktive-buergerschaft.de/buergerstiftungsfinder");
    curl_setopt($ch, CURLOPT_HEADER, 0);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);  
    $buffer = curl_exec($ch);
    curl_close($ch);
    $result = explode(",", $buffer);
    print_r($result);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

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.