Jump to content
php.lv forumi

fopen


euphoric

Recommended Posts

Tāda lieta :

 

Ir web lapa , tās saturā kkur izvadās kaut kādi skaitļi (kā piemērs).

 

Šos skaitļus gribētu pārvietot uz savas mājas lapas saturu. Tb. Tur nomainas, man automātiski arī.

 

Kaut kad sen biju uzmurgois tadu scriptu :

 

$handle = fopen("http://some-site.lv", "r");
$contents = '';
while (!feof($handle)) {
 $contents .= fread($handle, 8192);
}
fclose($handle);

 

Tad no $contents ar 'strpos', griezu ara $sakums, $beigas. Utt..

 

Man šķiet tāds neparasts risinājums varbūt ir kkādi citi veidi ?

 

Paldies : )

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...