xtract values from webpage

Ask about general coding issues or problems here.

Moderators: egami, macek, gesf

Post Reply
seandisanti
php-forum Fan User
php-forum Fan User
Posts: 973
Joined: Mon Oct 01, 2012 12:32 pm

Sun Mar 31, 2013 8:47 pm

your issue is here:

Code: Select all

$urn = fgets($file_handle); // get next URN
 
$urn is only ever assigned one character, and it's overwritten on every iteration. the tip off to the error should be that only the last is saved. change the line to read:

Code: Select all

$urn .= fgets($file_handle); // get next URN
 
and it should work fine for you. some of the most annoying bugs come down to one character like that.

Post Reply
  • Information
  • Who is online

    Users browsing this forum: Google [Bot] and 8 guests