Jump to content

[SOLVED] please help


serial

Recommended Posts

i don't me to sound ungreatful because im greatful for the reply but that doesn't help me much here is my code

 

<?php

 

 

$data = 'c:\test1.txt';

 

$scrambled = file_get_contents("http://www.chumley.biz/modules/programming9/programming9.php");

 

 

$f = fopen($data, 'w');

 

fwrite($f, $scrambled);

fclose($f);

}

echo $scrambled;

 

 

?>

Link to comment
https://forums.phpfreaks.com/topic/42458-solved-please-help/#findComment-206005
Share on other sites

ok i have the program to make a file but the file says:

 

uoakdshaott< br />rnemtov< br />neetneses< br />hklamoao

 

thats in the text file but i would like it to say:

uoakdshaott

rnemtov

neetneses

hklamoao

 

like this so i don't need the <br /> and i need it to start on a new line please help someone

 

thank you

Link to comment
https://forums.phpfreaks.com/topic/42458-solved-please-help/#findComment-206409
Share on other sites

here you go:

 

<?php

function word_sort($word)

{

$letters = str_split($word);

sort($letters);

return implode("", $letters);

}

 

$data = 'c:\www\chumley\test3.txt';

$handle = file_get_contents('http://www.chumley.biz/modules/programming9/programming9.php');

 

$some = str_replace("< br />", '\n', $handle);

file_put_contents('c:\www\chumley\test3.txt', $some);

 

$scrambled = file("test2.txt");

$unscrambled = file("states.txt");

foreach ($scrambled as $w)

{

foreach($unscrambled as $w2)

{

if(word_sort(trim($w)) == word_sort(trim($w2)))

echo trim($w2).":";

}

}

?>

Link to comment
https://forums.phpfreaks.com/topic/42458-solved-please-help/#findComment-206665
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.