http://www.website.com/service.asmx?sender=000000&message=message&receiver=000000
Now I'm trying to create a php script to load the value of the $receiver either from a text file which would have the numbers separated by a line break or from a text box in a form that would also separate the numbers according to line breaks. Then I want the script to visit that URL while changing the value of the &receiver=VALUE every single time to one of the numbers from the text file or the form and when the success code is returned it moves on to the next number.
What I have so far:
Code: Select all
<?php
$FileName = "info.txt";
$FileHandle = fopen($FileName,"r");
$FileContent = fread ($FileHandle,filesize ($FileName));
fclose($FileHandle);
// You can replace the \t with whichever delimiting character you are using
$SplitContent = explode("\t", $FileContent);
$arrayVar=serialize(urlencode($SplitContent));
foreach($SplitContent as $CurrValue)
{
header('Location: http://www.website.com/service.asmx?SMSText=TEST&SMSSender=000000&SMSReceiver=' . $CurrValue);
}
?>