473,320 Members | 1,846 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Search through website source code using fopen

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.com?id=**random id**.

Example:

Expand|Select|Wrap|Line Numbers
  1. $openurl = fopen('http://www.mywebsite.com', "r");
  2. while(! feof($openurl))
  3.   {
  4. //Which code do I need to use here?
  5.   }
  6.  
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.com/00123/?id=12345">

What code should I use to find these strings in the above mentioned example coding?
Apr 3 '10 #1
1 2655
Markus
6,050 Expert 4TB
The PCRE extension to PHP would be useful here. Check out the tutorials and learn some regular expressions.

Mark.
Apr 4 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Mayhem | last post by:
I would like to integrate an RSS newsfeed into my website but can't seem to figure out how. Has anyone got any pointers for me? E.
4
by: kimimaro | last post by:
Thank you for your help I think I know what the problem is. Firstly the add_record cannot read the record.txt or something if the record.txt (in which I used it to store the details of each record)...
13
by: sembiance | last post by:
Hi folks :) I've been working on a C/C++ Source Code search engine website for over a year now, and just thought I'd let you all know that I just put it live a few minutes ago. It searches 99...
3
by: Kamlesh | last post by:
Hi, How to implement website search in ASP.NET? We need to search our website (www.domain.com) for certain keywords and get the results. Our website includes static and dynamic content. Also...
4
by: amit | last post by:
Hi guys!I am trying to write a program which will segregate some selected keywords from a given file.The source code is given alongwith #include<stdio.h> #include<string.h> char...
16
by: Edward | last post by:
Hi All, I am having huge problems with a very simple dotnet framework web page (www.gbab.net/ztest3.aspx) , it does NOT render correctly under Apple's Safari. The DIV's do not align amd float as...
11
by: susiedba | last post by:
does anyone know of a framework; or tools; or something-- that describes an open source VB.net search engine / spider? anyone want to trade notes? I want to build something a lot more focused...
3
by: Richard S | last post by:
CODE: ASP.NET with C# DATABASE: ACCES alright, im having a problem, probably a small thing, but i cant figure out, nor find it in any other post, or on the internet realy (probably cuz i wouldnt...
6
by: junkmate | last post by:
I have made an RSS reader and am testing on the BBC website, and I use this code to grab the contents of the XML file, however when I look at the contents grabbed by my function, and the HTML...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.