Hi!
I want to search for the following string through the source code of website 'mywebsite.com' with fopen; http://sub.example.com/example.php?id= **random id** but do not want to include let's say http://sub2.example.co m?id=**random id**.
Example:
The source code of the website mywebsite.com has simple HTML coding and contains several links in one line. These links defer from this:
<img src="http://sub.example.com/example.php?id= 12345">
to this:
<img src="http://sub2.example.co m/00123/?id=12345">
What code should I use to find these strings in the above mentioned example coding?
I want to search for the following string through the source code of website 'mywebsite.com' with fopen; http://sub.example.com/example.php?id= **random id** but do not want to include let's say http://sub2.example.co m?id=**random id**.
Example:
Code:
$openurl = fopen('http://www.mywebsite.com', "r");
while(! feof($openurl))
{
//Which code do I need to use here?
}
<img src="http://sub.example.com/example.php?id= 12345">
to this:
<img src="http://sub2.example.co m/00123/?id=12345">
What code should I use to find these strings in the above mentioned example coding?
Comment