Jump to content

[SOLVED] search page for a sertain text


mysterbx

Recommended Posts

its the 2nd time im posting a similar message, sorry for that, but i didnt get any answer on the one before...

 

"Is it possible to search for a sertain text in the pettern..."

 

The pettern:

$body = 'Some text goes here...
","http://ps3.psu.com/media/need-for-speed-pro-street-/NFSPS_ps3PFTfront%255B9%255D.jpg","
","http://www.djuegos.com.ar/fotos/Need-For-Speed-Pro-Street06.jpg","
","http://www.djuegos.com.ar/fotos/Need-For-Speed-Pro-Street02.jpg","
","http://www.vgboxart.com/boxes/PS3/7972-v2-orig.jpg","
and_something_more_here...';

 

Search for ","http://(.*).jpg","

 

// OUTPUT:
http://ps3.psu.com/media/need-for-speed-pro-street-/NFSPS_ps3PFTfront%255B9%255D.jpg
http://www.djuegos.com.ar/fotos/Need-For-Speed-Pro-Street06.jpg
http://www.djuegos.com.ar/fotos/Need-For-Speed-Pro-Street02.jpg
http://www.vgboxart.com/boxes/PS3/7972-v2-orig.jpg

Link to comment
Share on other sites

it works, but is it possible to use preg_replace?

 

cus when i try to search google for images I see this:

Found Match:

http://www.vgboxart.com/boxes/PS3/7972-v2-orig.jpg&imgrefurl=http://www.vgboxart.com/view/7972/need.for.speed.pro.street/&start=1&h=822&w=500&sz=280&tbnid=MMAIKuHUlaBNnM:&tbnh=144&tbnw=88&hl=en&prev=/images%3Fq%3Dneed-for-speed-pro-street-box%26gbv%3D2%26svnum%3D10%26hl%3Den%26sa%3DG%26ie%3DUTF-8><img src=http://tbn0.google.com/images?q=tbn:MMAIKuHUlaBNnM:http://www.vgboxart.com/boxes/PS3/7972-v2-orig.jpg width=88 height=144></a></td><td align=center valign=bottom width=23% style="padding-top:1px"><a href=/imgres?imgurl=http://www.vgboxart.com/boxes/PS3/7972-v2.jpg&imgrefurl=http://www.vgboxart.com/view/7972/need.for.speed.pro.street/&start=2&h=534&w=320&sz=159&tbnid=nSyxMaxSQ1bCGM:&tbnh=132&tbnw=79&hl=en&prev=/images%3Fq%3Dneed-for-speed-pro-street-box%26gbv%3D2%26svnum%3D10%26hl%3Den%26sa%3DG%26ie%3DUTF-8><img src=http://tbn0.google.com/images?q=tbn:nSyxMaxSQ1bCGM:http://www.vgboxart.com/boxes/PS3/7972-v2.jpg width=79 height=132></a></td><td align=center valign=bottom width=23% style="padding-top:1px"><a href=/imgres?imgurl=http://www.vgboxart.com/boxes/PS3/7972-orig.jpg&imgrefurl=http://www.vgboxart.com/view/7972/need.for.speed.pro.street/&start=3&h=1022&w=1000&sz=266&tbnid=3PYZ7MXdvCK95M:&tbnh=150&tbnw=147&hl=en&prev=/images%3Fq%3Dneed-for-speed-pro-street-box%26gbv%3D2%26svnum%3D10%26hl%3Den%26sa%3DG%26ie%3DUTF-8><img src=http://tbn0.google.com/images?q=tbn:3PYZ7MXdvCK95M:http://www.vgboxart.com/boxes/PS3/7972-orig.jpg

 

output should look like this:

http://www.vgboxart.com/boxes/PS3/7972-v2-orig.jpg

http://www.vgboxart.com/boxes/PS3/7972-v2.jpg

....

Link to comment
Share on other sites

What does the output currently look like?

 

http://www.vgboxart.com/boxes/PS3/7972-v2-orig.jpg&imgrefurl=http://www.vgboxart.com/view/7972/need.for.speed.pro.street/&start=1&h=822&w=500&sz=280&tbnid=MMAIKuHUlaBNnM:&tbnh=144&tbnw=88&hl=en&prev=/images%3Fq%3Dneed-for-speed-pro-street-box%26gbv%3D2%26svnum%3D10%26hl%3Den%26sa%3DG%26ie%3DUTF-8><img src=http://tbn0.google.com/images?q=tbn:MMAIKuHUlaBNnM:http://www.vgboxart.com/boxes/PS3/7972-v2-orig.jpg width=88 height=144></a></td><td align=center valign=bottom width=23% style="padding-top:1px"><a href=/imgres?imgurl=http://www.vgboxart.com/boxes/PS3/7972-v2.jpg&imgrefurl=http://www.vgboxart.com/view/7972/need.for.speed.pro.street/&start=2&h=534&w=320&sz=159&tbnid=nSyxMaxSQ1bCGM:&tbnh=132&tbnw=79&hl=en&prev=/images%3Fq%3Dneed-for-speed-pro-street-box%26gbv%3D2%26svnum%3D10%26hl%3Den%26sa%3DG%26ie%3DUTF-8><img src=http://tbn0.google.com/images?q=tbn:nSyxMaxSQ1bCGM:http://www.vgboxart.com/boxes/PS3/7972-v2.jpg width=79 height=132></a></td><td align=center valign=bottom width=23% style="padding-top:1px"><a href=/imgres?imgurl=http://www.vgboxart.com/boxes/PS3/7972-orig.jpg&imgrefurl=http://www.vgboxart.com/view/7972/need.for.speed.pro.street/&start=3&h=1022&w=1000&sz=266&tbnid=3PYZ7MXdvCK95M:&tbnh=150&tbnw=147&hl=en&prev=/images%3Fq%3Dneed-for-speed-pro-street-box%26gbv%3D2%26svnum%3D10%26hl%3Den%26sa%3DG%26ie%3DUTF-8><img src=http://tbn0.google.com/images?q=tbn:3PYZ7MXdvCK95M:http://www.vgboxart.com/boxes/PS3/7972-orig.jpg

Link to comment
Share on other sites

here is images.google source for search "need for speed pro street"

 

<html><head><meta http-equiv=content-type content="text/html; charset=UTF-8"><title>need for speed for street box - Google vaizdų paieška</title><style><!--
.ts td,.tc{padding:0}.ts,.tb{border-collapse:collapse}div,td{color:#000}
.f{color:#666}
.flc,.fl:link{color:#77c}
a:link,.w,a.w:link,.w a:link,.q:visited,.q:link,.q:active,.q{color:#00c}
a:visited,.fl:visited{color:#551a8b}
a:active,.fl:active{color:red}
.t{background:#e5ecf9;color:#000}
.bb{border-bottom:1px solid #36c}
.bt{border-top:1px solid #36c}
.j{width:34em}
.h{color:#36c}
.i,.i:link{color:#a90a08}
.a,.a:link{color:green}
.z{display:none}
div.n{margin-top:1ex}
.n a{font-size:10pt;color:#000}
.n .i{font-size:10pt;font-weight:bold}
.b a{font-size:12pt;color:#00c;font-weight:bold}
#np,#nn,.nr,#logo span,.ch{cursor:pointer;cursor:hand}
.ta{padding:3px 3px 3px 5px}#tpa2,#tpa3{padding-top:9px}#gbar{float:left;font-weight:bold;height:22px;padding-left:2px}.gbh,.gb2 div{border-top:1px solid #c9d7f1;font-size:0;height:0}.gbh{position:absolute;top:24px;width:100%}.gb2 div{margin:5px}#gbi{background:#fff;border:1px solid;border-color:#c9d7f1 #36c #36c #a2bae7;top:24px;z-index:1000}#guser{padding-bottom:7px !important}#gbar,#guser{font-size:13px;padding-top:1px !important}@media all{.gb1,.gb3{height:22px;margin-right:.73em;vertical-align:top}}#gbi,.gb2{left:0;position:absolute;visibility:hidden}.gb2{z-index:1001}#gbar a,#gbar a:active,#gbar a:visited{color:#00c;font-weight:normal}.gb2 a,.gb3 a{text-decoration:none}.gb2 a{display:block;padding:.2em .5em}#gbar .gb2 a:hover{background:#36c;color:#fff}.sl,.r{font-weight:normal;margin:0;display:inline}
.sl{font-size:84%}
.r{font-size:100%}
.csb,#navbar div,#logo span{background:url(/images/nav_logo3.png) no-repeat;overflow:hidden;height:26px}
#navbar .nr{background-position:-60px 0;width:16px}
#navbar #np{width:44px}
#navbar #nf{background-position:-26px 0;width:18px}
#navbar #nc{background-position:-44px 0;width:16px}
#navbar #nn{background-position:-76px 0;width:66px;margin-right:34px}
#navbar #nl{background-position:-76px 0;width:46px}
#logo{display:block;width:150px;height:52px;position:relative;overflow:hidden;margin:15px 0 12px}
#logo span{background-position:0 -26px;position:absolute;top:0;left:0;width:100%;height:100%}
.ss{background:url(/images/nav_logo3.png) no-repeat;overflow:hidden;display:block;background-position:0 -87px;position:absolute;left:0;top:0}.cps{overflow:hidden;height:18px;width:114px}body,td,div,.p,a{font-family:arial,sans-serif}
#sd{font-size:113%;font-weight:bold}
#ap{font-size:64%}
--></style>
<script>window.google={kEI:"BrigR9ayEqi2-gK6_s3LDA",kEXPI:"0",kHL:"lt"};
function g(c){var d="undefined",a="1";if(c&&c.getElementById)if(typeof XMLHttpRequest!=d)a="2";else if(typeof ActiveXObject!=d){var b,e,f="MSXML2.XMLHTTP",h=[f+".6.0",f+".3.0",f,"Microsoft.XMLHTTP"];for(b=0,e;e=h[b++];)try{new ActiveXObject(e);a="2"}catch(i){}}return a};window.maybeRedirectForGBV=function(c,d,a){var b=g(c);if(b!=a)d.href="http://images.google.lt/images?hl=lt&q=need+for+speed+for+street+box&btnG=Ie%C5%A1koti+paveiksl%C4%97li%C5%B3&ei=BrigR9ayEqi2-gK6_s3LDA&gbv="+b};
maybeRedirectForGBV(document,location,"2");window._isr_load=function(a){var b=a.options[a.selectedIndex].value;if(b){location.href=b}return false};
window.clk=function(b,c,d,e,f,g){if(document.images){var a=encodeURIComponent||escape;(new Image).src="/url?sa=T"+(c?"&oi="+a(c):"")+(d?"&cad="+a(d):"")+"&ct="+a(e)+"&cd="+a(f)+(b?"&url="+a(b.replace(/#.*/,"")).replace(/\+/g,"%2B"):"")+"&ei=BrigR9ayEqi2-gK6_s3LDA"+g}return true};
window.gbar={};(function(){var b=window.gbar,c,h,i;function n(d,f,e){d.visibility=i?"hidden":"visible".left=f+"px".top=e+"px"}b.tg=function(d){var f=0,e=0,a,j=0,o,l=window.navExtra,m,g=document,k=0;h=h||g.getElementById("gbar").getElementsByTagName("span");(d||window.event).cancelBubble=!j;if(!c){c=g.createElement(Array.every||window.createPopup?"iframe":"DIV");c.frameBorder="0";c.scrolling="no";c.src="#";g.body.appendChild(c).id="gbi";if(l&&h[7])for(o in l){m=g.createElement("span");m.appendChild(l[o]);h[7].parentNode.insertBefore(m,h[7]).className="gb2"}g.onclick=b.close}while(a=h[++j]){if(e){n(a.style,e+1,f+25);k=Math.max(k,a.firstChild.tagName=="A"&&a.offsetWidth);f+=a.firstChild.tagName=="DIV"?9:20}if(a.className=="gb3"){do e+=a.offsetLeft;while(a=a.offsetParent)}}{j=0;while(a=h[++j]){if(a.className=="gb2")a.style.width=k+"px"}c.style.width=k+"px"}c.style.height=f+"px";n(c.style,e,24);i=!i};b.close=function(d){i&&b.tg(d)}})();</script></head><body bgcolor=#ffffff topmargin=3 marginheight=3 ><noscript><meta HTTP-EQUIV="refresh" content="0;url=http://images.google.lt/images?hl=lt&q=need+for+speed+for+street+box&btnG=Ie%C5%A1koti+paveiksl%C4%97li%C5%B3&gbv=1&ei=BrigR9ayEqi2-gK6_s3LDA"><style><!--
table,div,span,font,p{display:none}
--></style>
<div style="display:block">Jei per kelias sekundes nebūsite nukreipti, paspauskite <a href="http://images.google.lt/images?hl=lt&q=need+for+speed+for+street+box&btnG=Ie%C5%A1koti+paveiksl%C4%97li%C5%B3&gbv=1">čia</a>.</div></noscript><div id=gbar><nobr><span class=gb1><a href="http://www.google.lt/search?hl=lt&q=need+for+speed+for+street+box&gbv=2&ie=UTF-8&sa=N&tab=iw">Žiniatinklis</a></span> <span class=gb1>Vaizdai</a></span> <span class=gb1><a href="http://groups.google.lt/groups?hl=lt&q=need+for+speed+for+street+box&gbv=2&ie=UTF-8&sa=N&tab=ig">Grupės</a></span> <span class=gb1><a href="http://www.google.lt/search?hl=lt&q=need+for+speed+for+street+box&gbv=2&ie=UTF-8&cat=gwd/Top&sa=N&tab=id">Katalogas</a></span> <span class=gb1><a href="http://www.google.com/calendar/render?ie=UTF-8&sa=N&tab=ic">Kalendorius</a></span> <span class=gb1><a href="http://mail.google.com/mail/?ie=UTF-8&sa=N&tab=im">„Gmail“</a></span> <span class=gb1><a href="http://picasaweb.google.lt/lh/searchbrowse?hl=lt&q=need+for+speed+for+street+box&gbv=2&ie=UTF-8&sa=N&tab=iq">Nuotraukos</a></span> </nobr></div><div class=gbh style=left:0></div><div class=gbh style=right:0></div><table class=tb style=clear:left width=100%><tr><form name=gs method=GET action="/images"><td class=tc valign=top><a id=logo href="http://www.google.lt/webhp?hl=lt" title="Į pradinį Google puslapį">Google<span></span></a></td><td style="padding:0 0 7px;padding-left:8px" valign=top width=100%><table class=tb style="margin-top:25px"><tr><td class=tc nowrap><input type=hidden name=gbv value="2"><input type=hidden name=svnum value=10><input type=hidden name=hl value="lt"><input type=text name=q size=41 maxlength=2048 value="need for speed for street box" title="Ieškoti paveikslėlių"> <input type=submit name="btnG" value="Ieškoti paveikslėlių"> <input type=submit name="btnmeta=search=search" value="Ieškoti Žiniatinklis"></td><td class=tc nowrap width=100%><span id=ap>  <a href="/advanced_image_search?q=need+for+speed+for+street+box&gbv=2&svnum=10&hl=lt">Išplėstinė vaizdų paieška</a><br>  <a href="/preferences?q=need+for+speed+for+street+box&gbv=2&hl=lt">Nuostatos</a></span></td></tr></table></td></tr></form></table><table border=0 cellpadding=0 cellspacing=0 width=100% class="t bt"><tr><td nowrap><span id=sd> Vaizdai </span><font size=-1> Rodoma:  </font></td><td width=98%><form style="margin:0"><select name=imagesize onchange="_isr_load(this)" style="margin:2px 0"><option value="" selected>Visų dydžių vaizdai<option value="/images?q=need+for+speed+for+street+box&gbv=2&svnum=10&hl=lt&sa=G&imgsz=huge">Labai dideli paveikslėliai<option value="/images?q=need+for+speed+for+street+box&gbv=2&svnum=10&hl=lt&sa=G&imgsz=xxlarge">Dideli vaizdai<option value="/images?q=need+for+speed+for+street+box&gbv=2&svnum=10&hl=lt&sa=G&imgsz=small|medium|large|xlarge">Vidutinio dydžio vaizdai<option value="/images?q=need+for+speed+for+street+box&gbv=2&svnum=10&hl=lt&sa=G&imgsz=icon">Maži vaizdai</select></form></td><td align=right nowrap id=resultStats><font size=-1>Rezultatai nuo <b><span id=lowerLimit>1</span></b> iki <b><span id=upperLimit>21</span></b> iš maždaug <b><span id=maxLimit>1.290.000</span></b> užklausai <b>need for speed for street box</b>.  (<b>0,12</b> sekundės) </font></table><div><br><div id=ImgContent></div><script><!--
window.dyn = {};(function() {function i(a,c,d){var b="on"+c;if(a.addEventListener){a.addEventListener(c,d,false)}else if(a.attachEvent){a.attachEvent(b,d)}else{var e=a[b];a[b]=function(){var g=e.apply(this,arguments),h=d.apply(this,arguments);return g==undefined?h:(h==undefined?g:h&&g)}}};var j=window.dyn,l="tDataImage",m=[],o=0,q="",r="",s="",t=0;j.shouldShowAllImages=false;j.showBigFont=false;var u=3;window.onresize=v;function w(a,c,d,b){q=a;r=c;s=d;t=parseInt(b,10);i(window,"load",x);var e=y();z(e)}function x(){var a=A("navbar");if(a&&a.getElementsByTagName){var c=a.getElementsByTagName("a");for(var d=0;d<c.length;d++){c[d].onclick=function(){return B(this)}}}}function y(){if(document&&document.body&&document.body.clientWidth){return document.body.clientWidth}else{return window.innerWidth}}
function C(){if(document&&document.body&&document.body.clientHeight){return document.body.clientHeight}else{return window.innerHeight}}function D(a){return Math.ceil(17/a)*a}function z(a){var c=0;u=E(a);var d=j.shouldShowAllImages?21:D(u),b=Math.ceil(d/u),e="<table width=100% cellspacing=0 cellpadding=0 border=0>";for(var g=0;g<b;g++){var h="<tr>",k="<tr>";for(var n=0;n<u;n++){h+="<td id="+l+c+" align=center nowrap valign=bottom width="+100/u+"%></td>";k+="<td id=tDataText"+c+" align=center valign=top width="+
100/u+"%></td>";c++}h+="</tr>";k+="</tr>";e+=h+k}e+="</table>";A("ImgContent").innerHTML=e}function F(){var a=D(u);G(a);H(a)}function G(a){var c=t,d=parseInt(A("upperLimit").innerHTML,10);if(c<0){return}if(!isNaN(d)&&c>=d){return}var b=j.shouldShowAllImages?m.length:a;if(m.length<b){b=m.length}b=c+b;A("lowerLimit").innerHTML=c+1;A("upperLimit").innerHTML=b}function E(a){var c=0;if(!a){c=4}else if(a<=I(690)){c=3}else if(a<I(800)){c=4}else{c=Math.max(Math.floor(a/I(200)),3)}return c>7?7:c}function I(a){var c;
if(c=document.createElement("div")){c.style.width="10em";document.body.appendChild(c);var d=c.offsetWidth/10;document.body.removeChild(c);return d?Math.ceil(12.5*d*a/200):a}return a}function H(a){(new Image).src="/gen_204?bw="+y()+"&bh="+C()+"&ncols="+u+"&nimg="+a+"&atyp=i"}function v(){var a=y();if(E(a)!=u){z(a);var c=D(u);G(c);if(j.shouldShowAllImages){c=m.length}for(var d=0;d<c;d++){J(d)}}}function K(a,c,d,b,e,g,h,k,n,p,M,N,O,P,Q,R){var f=new Image;f.p=a;f.o=c;f.d=d;f.b=b;f.c=e;f.a=g;f.h=h;f.g=
k;f.j=n;f.n=p;f.i=M;f.l=N;f.f=O;f.e=P;f.k=Q;f.m=R;m[o]=f;var S=D(u);if(o<S||j.shouldShowAllImages){J(o)}o++}function J(a){var c="",d="";if(a>=m.length){return}var b=m[a];A(l+a).style.paddingTop=a<u?"0px":"20px";var e="/imgres?imgurl="+(b.b.indexOf("://")<0?"http://":"")+b.b+"&imgrefurl="+b.p+"&tbnid="+b.d+"&tbnh="+b.a+"&tbnw="+b.c+s+"&prev="+r;c+="<a href="+e+b.o+"><img style='border:1px solid;' src="+b.k+"?q=tbn:"+b.d+(b.m=="1"?b.b:"");if(b.c!=""&&b.a!=""){c+=" width="+b.c+" height="+b.a}c+="></a>";
A(l+a).innerHTML=c;d+="<font face=arial,sans-serif size=-1>";if(j.showBigFont){d+="<font size=3>"+b.h+"</font>"}else{d+=b.h}if(b.j!=""){d+="<span class=m>";if(b.g!=""){d+=" <font dir=ltr>- "+b.g+"</font>"}d+=" <font dir=ltr>- "+b.j+"</font></span>"}d+="<br>"+b.n+(b.i?" - "+b.i:"")+"<br><font color="+q+">"+b.l+"</font>";if(b.f!=""&&b.e!=""){d+="<br>[ <a class=fl href='"+b.f+"'>"+b.e+"</a> ]"}d+="</font>";A("tDataText"+a).innerHTML=d}function B(a){var c=document.location,d=a.href,
b,e=0,g=D(u);b=t<0?0:t;var h=false,k=a.getElementsByTagName("div");if(k&&k.length>0){h=k[0]}if(a.innerHTML.search("nav_next.gif")!=-1||h&&h.id=="nn"){e=b+g}else if(a.innerHTML.search("nav_previous.gif")!=-1||h&&h.id=="np"){e=b-g;if(e<=0){e=0}}else{var n=/(\d+)\s*$/,p=n.exec(a.innerHTML);if(p&&p[1]){e=p[1]*1*g-g}}d=L(d,"start",e)=L(d,"ndsp",g);c.href=d;return false}function L(a,c,d){var b=new RegExp("[?&]"+c+"=([^&]*)","i"),e=b.exec(a);if(e&&e.length>1){var g=e[0].charAt(0)+c+"="+d;a=a.replace(b,
g)}else{a+="&"+c+"="+d}return a}function A(a){return document.getElementById(a)}j.initialize=w;j.updateStatus=F;j.Img=K;
}) ();dyn.initialize("#008000", "/images%3Fq%3Dneed%2Bfor%2Bspeed%2Bfor%2Bstreet%2Bbox%26gbv%3D2%26svnum%3D10%26hl%3Dlt%26sa%3DG","", "0");dyn.Img("http://ps3.psu.com/Need-For-Speed-Pro-Street---g207.php&h=884&w=771&sz=550&hl=lt&start=1","","7yVTfGgs1hEDZM:","http://ps3.psu.com/media/need-for-speed-pro-street-/NFSPS_ps3PFTfront%255B9%255D.jpg","127","146","Game: \x3cb\x3eNeed\x3c/b\x3e For \x3cb\x3eSpeed\x3c/b\x3e Pro \x3cb\x3eStreet\x3c/b\x3e \x3cb\x3e...\x3c/b\x3e","","","771 x 884 - 550k","jpg","ps3.psu.com","","","http://tbn0.google.com/images","1");dyn.Img("http://www.gamersofperu.com/2007/12/need-for-speed-pro-street-analisis.html&h=720&w=1280&sz=105&hl=lt&start=2","","t8GqXMFJGoHHVM:","http://www.djuegos.com.ar/fotos/Need-For-Speed-Pro-Street06.jpg","150","84","Tags: analisis \x3cb\x3eneed\x3c/b\x3e for \x3cb\x3espeed\x3c/b\x3e pro \x3cb\x3e...\x3c/b\x3e","","","1280 x 720 - 105k","jpg","www.gamersofperu.com","","","http://tbn0.google.com/images","1");dyn.Img("http://cgi.ebay.it/NEED-FOR-SPEED-PRO-STREET-NUOVO-ITA-XBOX360-X-BOX-360_W0QQitemZ190184537454QQcmdZViewItem&h=720&w=1280&sz=249&hl=lt&start=3","","9E-cmu9c94NxCM:","http://www.djuegos.com.ar/fotos/Need-For-Speed-Pro-Street02.jpg","150","84","\x3cb\x3eNeed\x3c/b\x3e For \x3cb\x3eSpeed\x3c/b\x3e: Pro \x3cb\x3eStreet\x3c/b\x3e","","","1280 x 720 - 249k","jpg","cgi.ebay.it","/images?gbv=2&hl=lt&q=+site:www.djuegos.com.ar+need+for+speed+for+street+box","Daugiau iš www.djuegos.com.ar","http://tbn0.google.com/images","1");dyn.Img("http://www.vgboxart.com/view/7972/need.for.speed.pro.street/&h=822&w=500&sz=280&hl=lt&start=4","","MMAIKuHUlaBNnM:","http://www.vgboxart.com/boxes/PS3/7972-v2-orig.jpg","88","144","\x3cb\x3eNeed\x3c/b\x3e For \x3cb\x3eSpeed\x3c/b\x3e Pro \x3cb\x3eStreet\x3c/b\x3e","","","500 x 822 - 280k","jpg","www.vgboxart.com","","","http://tbn0.google.com/images","1");dyn.Img("http://www.vgboxart.com/view/7972/need.for.speed.pro.street/&h=534&w=320&sz=159&hl=lt&start=5","","nSyxMaxSQ1bCGM:","http://www.vgboxart.com/boxes/PS3/7972-v2.jpg","79","132","\x3cb\x3eNeed\x3c/b\x3e For \x3cb\x3eSpeed\x3c/b\x3e Pro \x3cb\x3eStreet\x3c/b\x3e","","","320 x 534 - 159k","jpg","www.vgboxart.com","","","http://tbn0.google.com/images","1");dyn.Img("http://blog.newsweek.com/blogs/levelup/archive/tags/Hype/default.aspx&h=621&w=480&sz=57&hl=lt&start=6","","F3DJ1m3toXcTPM:","http://blog.newsweek.com/photos/levelup/images/original/Need-For-Speed-ProStreet-postcard.aspx","105","136","\x3cb\x3e...\x3c/b\x3e Game \x3cb\x3eNeed\x3c/b\x3e For \x3cb\x3eSpeed\x3c/b\x3e Pro \x3cb\x3eStreet\x3c/b\x3e","","","480 x 621 - 57k","aspx","blog.newsweek.com","","","http://tbn0.google.com/images","1");dyn.Img("http://trivuz.com/games/index.php/2008/01/07/cool-need-for-speed-pro-street-2008-keygen-trainer/&h=308&w=549&sz=33&hl=lt&start=7","","X12Gxbl-VW00iM:","http://www.itnewsonline.com/images/news/EA-NfS-ProStreet-4.jpg","133","75","Cool \x3cb\x3eNeed\x3c/b\x3e For \x3cb\x3eSpeed\x3c/b\x3e Pro \x3cb\x3eStreet\x3c/b\x3e 2008+ \x3cb\x3e...\x3c/b\x3e","","","549 x 308 - 33k","jpg","trivuz.com","","","http://tbn0.google.com/images","1");dyn.Img("http://teknolojiburasi.blogcu.com/6288011&h=307&w=547&sz=76&hl=lt&start=8","","rW0V4Kg2087CdM:","http://www.ea.com/downloads/eagames/nfs/prostreet/content/teaser/race_day.jpg","133","75","\x3cb\x3eNeed\x3c/b\x3e For \x3cb\x3eSpeed\x3c/b\x3e Pro \x3cb\x3eStreet\x3c/b\x3e 11 İndir \x3cb\x3e...\x3c/b\x3e","","","547 x 307 - 76k","jpg","teknolojiburasi.blogcu.com","","","http://tbn0.google.com/images","1");dyn.Img("http://www.sat2m.ir/need-speed-pro-t11423/index.html%3Ft%3D11423&h=291&w=430&sz=32&hl=lt&start=9","","0pOz2IM1HaH-3M:","http://tintafantasma.net/imagenes/need_for_speed_pro_street-01.jpg","126","85","دانلود بازی \x3cb\x3eNeed\x3c/b\x3e For \x3cb\x3eSpeed\x3c/b\x3e Pro \x3cb\x3e...\x3c/b\x3e","","","430 x 291 - 32k","jpg","www.sat2m.ir","","","http://tbn0.google.com/images","1");dyn.Img("http://www.elhabib.at/2007/05/31/need-for-speed-pro-street-nun-offiziell/&h=281&w=500&sz=28&hl=lt&start=10","","uRFIrPFFY3pigM:","http://www.elhabib.at/wp-content/uploads/2007/05/need03.jpg","130","73","\x3cb\x3eNeed\x3c/b\x3e for \x3cb\x3eSpeed\x3c/b\x3e Pro \x3cb\x3eStreet\x3c/b\x3e 2","","","500 x 281 - 28k","jpg","www.elhabib.at","","","http://tbn0.google.com/images","1");dyn.Img("http://lanzone.onet.ua/index.php%3Fdo%3Dcat%26category%3Dgames_trailers&h=569&w=1000&sz=74&hl=lt&start=11","","yVEDJ6apaXUEqM:","http://lanzone.onet.ua/uploads/posts/2007-10/1191702794_pic_1.jpg","149","85","\x3cb\x3eNeed\x3c/b\x3e for \x3cb\x3eSpeed\x3c/b\x3e: Pro \x3cb\x3eStreet\x3c/b\x3e | Трейлер","","","1000 x 569 - 74k","jpg","lanzone.onet.ua","","","http://tbn0.google.com/images","1");dyn.Img("http://lanzone.onet.ua/index.php%3Fdo%3Dcat%26category%3Dgames_trailers&h=284&w=500&sz=21&hl=lt&start=12","","fVhuHObMYx2XlM:","http://lanzone.onet.ua/uploads/posts/2007-10/thumbs/1191702794_pic_1.jpg","130","74","\x3cb\x3eNeed\x3c/b\x3e for \x3cb\x3eSpeed\x3c/b\x3e: Pro \x3cb\x3eStreet\x3c/b\x3e | Трейлер","","","500 x 284 - 21k","jpg","lanzone.onet.ua","","","http://tbn0.google.com/images","1");dyn.Img("http://www.dutdibi.com/forum/need-for-speed-underground-t13494.html&h=800&w=564&sz=167&hl=lt&start=13","","tM1ZN-WUaQZgaM:","http://i121.photobucket.com/albums/o211/ash25_nofear/nfs7-cover-groDF.jpg","101","143","It is part of the \x3cb\x3eNeed\x3c/b\x3e for \x3cb\x3eSpeed\x3c/b\x3e \x3cb\x3e...\x3c/b\x3e","","","564 x 800 - 167k","jpg","www.dutdibi.com","","","http://tbn0.google.com/images","1");dyn.Img("http://www.paylasmaliyiz.biz/2007/11/18/need-for-speed-pro-street/&h=400&w=283&sz=39&hl=lt&start=14","","U-c4Js6J3KR47M:","http://wegas.ru/uploads/posts/1183461412_nfs_pro_street.jpg","88","124","2007 yılında “\x3cb\x3eNeed\x3c/b\x3e For \x3cb\x3eSpeed\x3c/b\x3e Pro \x3cb\x3e...\x3c/b\x3e","","","283 x 400 - 39k","jpg","www.paylasmaliyiz.biz","","","http://tbn0.google.com/images","1");dyn.Img("http://ps3.thegamereviews.com/story-416-PSN-Update-11008.html&h=495&w=950&sz=58&hl=lt&start=15","","G-QiSRvaU9ZwoM:","http://recensioni-videogiochi.dvd.it/images/Need_For_Speed_Pro_Street/need-for-speed-pro-street-01-l.jpg","148","77","\x3cb\x3eNeed\x3c/b\x3e for \x3cb\x3eSpeed\x3c/b\x3e: ProStreet Vehicles","","","950 x 495 - 58k","jpg","ps3.thegamereviews.com","","","http://tbn0.google.com/images","1");dyn.Img("http://jlymo.wordpress.com/2007/11/18/need-for-speed-prostreet/&h=720&w=1280&sz=78&hl=lt&start=16","","mAQiqzEkzqtEIM:","http://www.ps2vicio.com/imagenes1/PS3/Need_For_Speed_ProStreet/Need_For_Speed_ProStreet_3.jpg","150","84","\x3cb\x3eNeed\x3c/b\x3e for \x3cb\x3eSpeed\x3c/b\x3e ProStreet","","","1280 x 720 - 78k","jpg","jlymo.wordpress.com","","","http://tbn0.google.com/images","1");dyn.Img("http://actualgameplay.com/games/n/&h=680&w=480&sz=113&hl=lt&start=17","","pgggEJa68j7jnM:","http://actualgameplay.com/wp-content/uploads/2007/05/nfs-carbon-box.jpg","98","139","\x3cb\x3eNeed\x3c/b\x3e for \x3cb\x3eSpeed\x3c/b\x3e: Carbon","","","480 x 680 - 113k","jpg","actualgameplay.com","","","http://tbn0.google.com/images","1");dyn.Img("http://kankileriz.com/need-for-speed-pro-street-full-linkler-sicak-t15258.html&h=566&w=400&sz=150&hl=lt&start=18","","cX5KRjpmNPA0rM:","http://atanna.kucukresim.com/uploads/791df5aee1.jpg","95","134","\x3cb\x3eNEED\x3c/b\x3e FOR \x3cb\x3eSPEED\x3c/b\x3e PRO \x3cb\x3eSTREET\x3c/b\x3e - FULL .","","","400 x 566 - 150k","jpg","kankileriz.com","","","http://tbn0.google.com/images","1");dyn.Img("http://cherid.com/tag/%25D0%25BE%25D0%25B1%25D0%25BE%25D0%25B8%2BNFS%3Fpage%3D757%26nggpage%3D8&h=600&w=750&sz=121&hl=lt&start=19","","Or59la5p7KYE5M:","http://cherid.com/wp-content/gallery/news-pictures/4_nfs-pro-street-need-for-speed-prostreet_cherid.com.jpg","141","113","Обои \x3cb\x3eNeed\x3c/b\x3e For \x3cb\x3eSpeed\x3c/b\x3e (NFS) Pro \x3cb\x3eStreet\x3c/b\x3e","","","750 x 600 - 121k","","cherid.com","","","http://tbn0.google.com/images","1");dyn.Img("http://forums.vault9.net/lofiversion/index.php/t36160.html&h=599&w=424&sz=41&hl=lt&start=20","","cUp_V14E4WOweM:","http://img411.imageshack.us/img411/273/needofrspeedprocoverul7.jpg","96","135","\x3cb\x3eNeed\x3c/b\x3e for \x3cb\x3eSpeed\x3c/b\x3e: ProStreet will take \x3cb\x3e...\x3c/b\x3e","","","424 x 599 - 41k","jpg","forums.vault9.net","","","http://tbn0.google.com/images","1");dyn.Img("http://guides.gamepressure.com/needforspeedmostwanted/&h=354&w=250&sz=36&hl=lt&start=21","","u2aYK8R0APDmyM:","http://guides.gamepressure.com/needforspeedmostwanted/gfx/skin/box.jpg","85","121","\x3cb\x3eNeed\x3c/b\x3e for \x3cb\x3eSpeed\x3c/b\x3e: Most Wanted","","","250 x 354 - 36k","jpg","guides.gamepressure.com","","","http://tbn0.google.com/images","1");dyn.updateStatus();//-->

</script><br clear=all><div id=navbar class=n><table border=0 cellpadding=0 width=1% cellspacing=0 align=center><tr align=center style=text-align:center valign=top><td nowrap><div id=nf></div><td nowrap><div id=nc></div><span class=i>1</span><td nowrap><a href="/images?q=need+for+speed+for+street+box&gbv=2&svnum=10&hl=lt&start=21&sa=N"><div class=nr></div>2</a><td nowrap><a href="/images?q=need+for+speed+for+street+box&gbv=2&svnum=10&hl=lt&start=42&sa=N"><div class=nr></div>3</a><td nowrap><a href="/images?q=need+for+speed+for+street+box&gbv=2&svnum=10&hl=lt&start=63&sa=N"><div class=nr></div>4</a><td nowrap><a href="/images?q=need+for+speed+for+street+box&gbv=2&svnum=10&hl=lt&start=84&sa=N"><div class=nr></div>5</a><td nowrap><a href="/images?q=need+for+speed+for+street+box&gbv=2&svnum=10&hl=lt&start=105&sa=N"><div class=nr></div>6</a><td nowrap><a href="/images?q=need+for+speed+for+street+box&gbv=2&svnum=10&hl=lt&start=126&sa=N"><div class=nr></div>7</a><td nowrap><a href="/images?q=need+for+speed+for+street+box&gbv=2&svnum=10&hl=lt&start=147&sa=N"><div class=nr></div>8</a><td nowrap><a href="/images?q=need+for+speed+for+street+box&gbv=2&svnum=10&hl=lt&start=168&sa=N"><div class=nr></div>9</a><td nowrap><a href="/images?q=need+for+speed+for+street+box&gbv=2&svnum=10&hl=lt&start=189&sa=N"><div class=nr></div>10</a><td nowrap class=b><a href="/images?q=need+for+speed+for+street+box&gbv=2&svnum=10&hl=lt&start=21&sa=N"><div id=nn></div>Kitas</a></table></div></div><center>
<br clear=all><br><table border=0 cellpadding=0 cellspacing=0 width=100% class="ft t bb bt"><tr><td align=center> <br><table border=0 cellpadding=0 cellspacing=0 align=center><form method=GET action=/images><tr><td nowrap>
<font size=-1><input type=text name=q size=31 maxlength=2048 value="need for speed for street box" title=""> <input type=submit name="btnG" value="Ieškoti paveikslėlių"> <input type=submit name="btnmeta=search=search" value="Ieškoti Žiniatinklis"><input type=hidden name=gbv value="2"><input type=hidden name=svnum value=10><input type=hidden name=hl value="lt"></font></td></tr></form></table><br></td></tr></table></center><center><p><hr class=z><div style=padding:2px class=""><font size=-1>©2008 Google - <a href="http://www.google.lt/">Pradžios Google tinklalapis</a> - <a href="http://adwords.google.com/select?hl=lt">Reklamavimosi programa</a> - <a href="http://www.google.lt/intl/lt/about.html">Viskas apie Google</a></font></div><br></center></body></html>

 

it should be replaced with links that have .jpg ending and start with http...

 

Replace all content end show results for preg_match_all (i think preg match all is the best solution..)

 

Code (some of it)

preg_match_all('#\",\"http://(.*).jpg\",\"#ise',$document,$matches);
print_r($matches);

 

Output:

http://www.vgboxart.com/boxes/PS3/7972-v2-orig.jpg
http://www.vgboxart.com/boxes/PS3/7972-v2.jpg

Link to comment
Share on other sites

try

<?php
$a = 'http://www.vgboxart.com/boxes/PS3/7972-v2-orig.jpg&imgrefurl=http://www.vgboxart.com/view/7972/need.for.speed.pro.street/&start=1&h=822&w=500&sz=280&tbnid=MMAIKuHUlaBNnM:&tbnh=144&tbnw=88&hl=en&prev=/images%3Fq%3Dneed-for-speed-pro-street-box%26gbv%3D2%26svnum%3D10%26hl%3Den%26sa%3DG%26ie%3DUTF-8><img src=http://tbn0.google.com/images?q=tbn:MMAIKuHUlaBNnM:http://www.vgboxart.com/boxes/PS3/7972-v2-orig.jpg width=88 height=144></a></td><td align=center valign=bottom width=23% style="padding-top:1px"><a href=/imgres?imgurl=http://www.vgboxart.com/boxes/PS3/7972-v2.jpg&imgrefurl=http://www.vgboxart.com/view/7972/need.for.speed.pro.street/&start=2&h=534&w=320&sz=159&tbnid=nSyxMaxSQ1bCGM:&tbnh=132&tbnw=79&hl=en&prev=/images%3Fq%3Dneed-for-speed-pro-street-box%26gbv%3D2%26svnum%3D10%26hl%3Den%26sa%3DG%26ie%3DUTF-8><img src=http://tbn0.google.com/images?q=tbn:nSyxMaxSQ1bCGM:http://www.vgboxart.com/boxes/PS3/7972-v2.jpg width=79 height=132></a></td><td align=center valign=bottom width=23% style="padding-top:1px"><a href=/imgres?imgurl=http://www.vgboxart.com/boxes/PS3/7972-orig.jpg&imgrefurl=http://www.vgboxart.com/view/7972/need.for.speed.pro.street/&start=3&h=1022&w=1000&sz=266&tbnid=3PYZ7MXdvCK95M:&tbnh=150&tbnw=147&hl=en&prev=/images%3Fq%3Dneed-for-speed-pro-street-box%26gbv%3D2%26svnum%3D10%26hl%3Den%26sa%3DG%26ie%3DUTF-8><img src=http://tbn0.google.com/images?q=tbn:3PYZ7MXdvCK95M:http://www.vgboxart.com/boxes/PS3/7972-orig.jpg';
preg_match_all('/http:\/\/[^=]*\.jpg/',$a,$b);
print_r($b);
?>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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