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

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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T09:27:45+00:00 2026-06-14T09:27:45+00:00

Previosly I have been pulling in some page content via CURL from the BBC

  • 0

Previosly I have been pulling in some page content via CURL from the BBC site using this code,

    $c = curl_init('http://news.bbc.co.uk/sport1/hi/football/eng_conf/conference_north_table/default.stm');

    curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
    $html =  curl_exec ($c);
    if (curl_error($c))
        die(curl_error($c));

    $startpos = strpos($html, '<table border="1" cellpadding="1" cellspacing="0" class="fulltable">');

    $endpos = strpos($html, '<!-- E IINC -->');
    $length = $endpos - $startpos;
    $rest = substr($html, $startpos,$length);
    $rest = str_replace("border=\"1\" cellpadding=\"1\" cellspacing=\"0\"","border=\"0\" cellpadding=\"0\" cellspacing=\"0\"", $rest);
    $rest = str_replace('<tr><td colspan="15"><hr/></td></tr>',"", $rest);

    $rest = str_replace('<tr>
      <td colspan="15">
         <div style="padding: 10px 0 0 0;"><img src=" http://newsimg.bbc.co.uk/sol/shared/img/tbl_spc.gif" height="2px" width="100%"></div>
      </td>
   </tr>
',"", $rest);

    echo $rest;
    curl_close($c);

Previously this was working fine using php 5.1.3 on an old server we have since migrated the site to a server running 5.4.8, however the above code is not working anymore, is there any reason for this? I cannot see any problem.

If I kill the script at $html I get the following reponse,

LEAGUE TABLE

MOVED PERMANENTLY

The document has moved here.

However if I navigate to the URL through the browser I can view the page fine, so it obviously has not moved anywhere (backed up by the fact the Curl request was working before we migrated servers.

  • 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-14T09:27:47+00:00Added an answer on June 14, 2026 at 9:27 am

    The address has actually moved. Change the first line with:

    $c = curl_init('http://news.bbc.co.uk/sport2/hi/football/eng_conf/conference_north_table/default.stm');
    

    The above code now shows me the table with the results.

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

Sidebar

Related Questions

I previously have been reading NMEA data from a GPS via a serial port
I have been away from PHP for quite a while, so hopefully this is
I believe this question might have been previously attempted in 2006 on a different
I'm looking to implement a REST client in PHP, and have previously been using
This must have been answered previously, but my Google powers are off today and
Basically, I am using Wireshark looking at captures that have been created previously. How
I have a database with existing data, where previously I've been using AUTO_INCREMENT on
Now that people have been using C# 4.0 for a while I thought I'd
hei, assume that i have this code: <StackPanel> <Canvas x:Name=canvas Height=400 Width=235> <Image x:Name=image
I have been working on this thing for client broker server system but 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.