View Single Post
Old 01-30-2013, 02:57 AM   PM User | #16
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,635
Thanks: 4
Thanked 2,448 Times in 2,417 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
I just dragged the link out here. You look alright, this is what I see:
Code:
Connecting to mail.opi.yahoo.com
Sending request: GET /online?u=iman_rush&m=a&t=1 HTTP/1.1
Host: mail.opi.yahoo.com
Connection: Close


Response received: HTTP/1.1 200 OK
Date: Wed, 30 Jan 2013 02:48:43 GMT
P3P: policyref="http://info.yahoo.com/w3c/p3p.xml", CP="CAO DSP COR CUR ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi UNRi PUBi IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE LOC GOV"
Expires: Thu, 05 Jan 1995 22:00:00 GMT
Cache-Control: private
Vary: Accept-Encoding
Connection: close
Transfer-Encoding: chunked
Content-Type: text/plain; charset=utf-8

2      
00
0
Which means it is pulling the "status" as 00.

If you are calling from /index.php the file in /files/ym/status.php, and it is opening the ./icons/00/icon.gif, than the problem here is that the filepath is incorrect. The filepath to the icon is under /files/ym/icons/00/icon.gif, but from the index, this path will resolve to /icons/00/icon.gif, which means you aren't getting the file you need.

Go back to the previous code you had without the printf's in it, and change this: $file = './icon/'.$sStatus.'/'.$_GET['img'].'.gif'; // This $_GET['img'] isn't really the most secure. Perhaps a switch validation should be used. to this: $file = __DIR__ . '/./icon/'.$sStatus.'/'.$_GET['img'].'.gif'; // This $_GET['img'] isn't really the most secure. Perhaps a switch validation should be used. and see if that does the trick.

I'm still curious as to why the file_get_contents is used directly within the status on the original code, but I have to find it as the second line of the body.

Edit:
Actually, your problem may be even easier than this:
Code:
<!doctype html public "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head><title>Yahoo!</title><meta name="ROBOTS" content="NOINDEX" /><style>
/* nn4 hide */ 
/*/*/
body {font:small/1.2em arial,helvetica,clean,sans-serif;font:x-small;text-align:center;}table {font-size:inherit;font:x-small;}
html>body {font:83%/1.2em arial,helvetica,clean,sans-serif;}input {font-size:100%;vertical-align:middle;}p, form {margin:0;padding:0;}
p {padding-bottom:6px;margin-bottom:10px;}#doc {width:48.5em;margin:0 auto;border:1px solid #fff;text-align:center;}#ygma {text-align:right;margin-bottom:53px}
#ygma img {float:left;}#ygma div {border-bottom:1px solid #ccc;padding-bottom:8px;margin-left:152px;}#bd {clear:both;text-align:left;width:75%;margin:0 auto 20px;}
h1 {font-size:135%;text-align:center;margin:0 0 15px;}legend {display:none;}fieldset {border:0 solid #fff;padding:.8em 0 .8em 4.5em;}
form {position:relative;background:#eee;margin-bottom:15px;border:1px solid #ccc;border-width:1px 0;}
#s1p {width:15em;margin-right:.1em;}
form span {position:absolute;left:70%;top:.8em;}form a {font:78%/1.2em arial;display:block;padding-left:.8em;white-space:nowrap;background: url(http://l.yimg.com/a/i/s/bullet.gif) no-repeat left center;} 
form .sep {display:none;}.more {text-align:center;}#ft {padding-top:10px;border-top:1px solid #999;}#ft p {text-align:center;font:78% arial;}
/* end nn4 hide */
</style></head>
<body><div id="doc">
<div id="ygma"><a href="http://us.rd.yahoo.com/default/*http://www.yahoo.com"><img src=http://l.yimg.com/a/i/yahoo.gif width=147 height=31 border=0 alt="Yahoo!"></a><div><a href="http://us.rd.yahoo.com/default/*http://www.yahoo.com">Yahoo!</a> - <a href="http://us.rd.yahoo.com/default/*http://help.yahoo.com">Help</a></div></div>
<div id="bd"><h1>Sorry, the page you requested was not found.</h1>
<p>Please check the URL for proper spelling and capitalization. If you're having trouble locating a destination on Yahoo!, try visiting the <strong><a href="http://us.rd.yahoo.com/default/*http://www.yahoo.com">Yahoo! home page</a></strong> or look through a list of <strong><a href="http://us.rd.yahoo.com/default/*http://docs.yahoo.com/docs/family/more/">Yahoo!'s online services</a></strong>. Also, you may find what you're looking for if you try searching below.</p>
<form name="s1" action="http://us.rd.yahoo.com/default/*-http://search.yahoo.com/search"><fieldset>
<legend><label for="s1p">Search the Web</label></legend>
<input type="text" size=30 name="p" id="s1p" title="enter search terms here">
<input type="submit" value="Search">
<span><a href="http://us.rd.yahoo.com/default/*http://search.yahoo.com/search/options?p=">advanced search</a> <span class=sep>|</span> <a href="http://us.rd.yahoo.com/default/*http://buzz.yahoo.com">most popular</a></span>
</fieldset></form>
<p class="more">Please try <strong><a href="http://us.rd.yahoo.com/default/*http://help.yahoo.com">Yahoo! Help Central</a></strong> if you need more assistance.</p>
</div><div id="ft"><p>Copyright &copy; 2006 Yahoo! Inc. All rights reserved. <a href="http://us.rd.yahoo.com/default/*http://privacy.yahoo.com">Privacy Policy</a> - <a href="http://us.rd.yahoo.com/default/*http://docs.yahoo.com/info/terms/">Terms of Service</a></p></div>
</div></body></html>
That indicates the link for /online is no good.

__________________
As of PHP 5.5, the MySQL library has been officially deprecated. It is recommended to move to either MySQLi or PDO libraries for your mysql connectivity. See here for help choosing which interface you prefer: http://php.net/manual/en/mysqlinfo.api.choosing.php

Last edited by Fou-Lu; 01-30-2013 at 03:08 AM..
Fou-Lu is offline   Reply With Quote
Users who have thanked Fou-Lu for this post:
iman (01-31-2013)