Jump to content

kazymjir

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Male
  • Location
    Poland

kazymjir's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. This is the encoding problem. Make sure that your php script and xml file uses the same encoding. The PHP file encoding is here: header('Content-Type: text/html; charset=iso-8859-1'); The XML file encoding should be at the top of your xml file.
  2. This code works fine for me. Try to run it again, maybe it was temporary problem with Twitter servers.
  3. I guess you use ID with SQL WHERE clause, yes? Instead of something like $id = (int)$_GET['Item']; $query = "SELECT * FROM Table WHERE id = {$id}"; you can use $name = $_GET['item']; "SELECT * FROM Table WHERE name = {$name}" Btw, always use mysql_real_escape() while inserting POST/GET data into SQL queries.
  4. Using this library, you can get needed content using this code (not tested, but should work): $html = file_get_html('http://finance.yahoo.com/q?s=NFLX'); echo $html->find('td[class=yfnc_tabledata1]')->innertext;
  5. @Jesirose, file_get_contents() can read URIs and there is no need to use cURL: http://php.net/manual/en/function.file-get-contents.php @unemployment, Parse HTML DOM instead of using regexps on big HTML file. Consider using my favorite library for this purpose: http://simplehtmldom.sourceforge.net/
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.