Jump to content

A mind challenging question, or is it!


npsari

Recommended Posts

Hi there,

 

I have a page which is full of HTML codes

the page URL is /bulk/twister/

 

In the middle of the codes, there is this bit

<td class="text" width="70" height="70" bgcolor="#ffffff" >
<a id="reget_url" href="/users/"><img border="0" alt="" src="/images/user/5676.jpg" /></a>
<td>

 

I want to get the image src out of all the mess in the page

So, what i done is,

 

step 1. I include the page first (Which i am not sure if it is correct, because the HTMl is not disabled)

 

<?php

include "../bulk/twister/";

?>

 

Then, i dont know the script which will get the image src

Can't i use the reget_url part? (which as you can see above, it stays the same)

 

Your help will be amazing

 

 

Link to comment
https://forums.phpfreaks.com/topic/105029-a-mind-challenging-question-or-is-it/
Share on other sites

Actually, no, you are correct, there are more than one <img

 

Now a realized that /users/ is the same always, and it is the first one to occur in the page

 

Can you tell me how can i make the script to pick between /users/ to <td>

 

i.e., this part:

 

<img border="0" alt="" src="/images/user/5676.jpg" /></a>

 

And I will then take it from there

 

Ohh, and how do i read the page without including it  :-\

Well, i think i was wondering how can i get /users/ to be the search term

but actually, i can do that myself

 

I just need a way to read the page now

and may i mention, that this page is an external page

which is not hosted in my server

It is from a different website

 

I checked this link out, but it talks about reading text files only

http://php.about.com/od/advancedphp/ss/php_read_file.htm

 

Not how to read a webpage

 

any hints on that

 

Perhaps i can  put it include it in a text area, then submit the text area

print"<textarea>";

include "http://www.example.com";

print"</textarea>";

 

That should do it i guess

 

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.