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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T22:55:33+00:00 2026-06-02T22:55:33+00:00

Trying to parse some phone numbers from a website . While I’m getting the

  • 0

Trying to parse some phone numbers from a website.

While I’m getting the source code via cURL, I get back only half of the code but the part that’s missing is exactly what I need. This thing keeps bugging me.

My code so far:

$ch = curl_init("http://www.baroul-bucuresti.ro/index.php?w=definitivi&l=C&p=2");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_BINARYTRANSFER, true);
$content = curl_exec($ch);
curl_close($ch);
print_r ($content);
  • 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-06-02T22:55:37+00:00Added an answer on June 2, 2026 at 10:55 pm

    I think the problem is that the url in question has a 302 in it, redirecting it to another location:

    $ telnet www.baroul-bucuresti.ro 80
    Trying 91.208.179.20...
    Connected to www.baroul-bucuresti.ro.
    Escape character is '^]'.
    GET /index.php?w=definitivi&l=C&p=2 HTTP/1.1
    host: www.baroul-bucuresti.ro
    
    HTTP/1.1 302 Found
    Date: Fri, 27 Apr 2012 20:24:54 GMT
    Server: Apache/2.2.15 (CentOS)
    X-Powered-By: PHP/5.3.3
    Set-Cookie: PHPSESSID=qjbqvveqtmarv7o0f820bbeq71; path=/
    Expires: Thu, 19 Nov 1981 08:52:00 GMT
    Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
    Pragma: no-cache
    Set-Cookie: for_tablou=1
    Set-Cookie: bvbsessionhash=b9c609e162dab90fc86c1fdb52e07fdd; expires=Sun, 27-May-2012 20:24:57 GMT; path=/
    Set-Cookie: bvblastvisit=1335558297; expires=Sun, 27-May-2012 20:24:57 GMT; path=/
    Set-Cookie: bvblastactivity=1335558297; expires=Sun, 27-May-2012 20:24:57 GMT; path=/
    Set-Cookie: bvbuserid=deleted; expires=Thu, 28-Apr-2011 20:24:56 GMT; path=/
    Set-Cookie: for_tablou=1
    Location: /tablou
    

    I’ve changed your code by adding this option to curl:

    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
    

    And it seems to get the full contents now.. dont know if its the content you want, but it gets the full contents of the real location, could you give it a try?

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

Sidebar

Related Questions

I am trying to parse some JSON on the Windows Phone with DataContractJsonSerializer .
I am trying to parse some XML i have retrieved via e4x in an
I'm trying to parse some returned html (from http://www.google.com/movies?near=37130 )to look for currently playing
I am trying to parse some XML, however, I get the error above this
I am trying to parse some output data from and PBX and I have
I'm trying to parse some HTML. I use stringWithContentsOfURL to get the HTML. I
I am trying to parse some unicode text from an excel2007 cell read by
I am trying to parse some data from external site to local script. Local
I was trying to parse some HTML content from a site. Nokogiri works perfectly
I am trying to parse some text from a xml. But text contains enter

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.