
dose
Members-
Posts
32 -
Joined
-
Last visited
Never
Everything posted by dose
-
Is there a way that i can stop hotlinking from a specific subdomain on my site?? I have mysite.com then serving images from sub.mysite.com, nobody but my domain should be able to use these images in the sub domain..
-
Nobody knows how to work with animated pngs with php/gd?? Or point me someplace with some info on it.. I can only find exe programs which is not what i need
-
Looking to make a dynamic animated png.. But i cant find really anything about it when i google.. Anyone have any info or links??
-
im a bonehead lol.. i forgot to add the cookie to my curl =/
-
anyone?? this has been buggin me for a while i think i gave up on tryin to do it like 7 or 8 times now :-\
-
htaccess Problem: Pretty URL with ~username and ip - Please Help!
dose replied to DingDong's topic in PHP Coding Help
if your original code worked you shouldnt have to change it.. i would guess its a setting your host has disabled or something -
htaccess Problem: Pretty URL with ~username and ip - Please Help!
dose replied to DingDong's topic in PHP Coding Help
^test.php/(.*)\$ is what you turn test.php into.. so why would you add .php to that part if you dont want it in the url.. im kinda lost now lol -
htaccess Problem: Pretty URL with ~username and ip - Please Help!
dose replied to DingDong's topic in PHP Coding Help
RewriteRule ^testitemnews\/(.*) test.php?id=$1 [QSA,L] Should work, im not a expert with htaccess but i have similar entries in my htaccess. Heres one of mine. Which comes up as domain.com/generators/somegame RewriteRule ^generators\/(.*) gen.php?game=$1 [NC] -
So ive tried this a few times and gave up, and im attempting to do it again but running into the same problems =/ I wanna be able to download and save an image like this. http://www.socom.com/en-us/Clan/Badge?name=the+potheads (You will need to verify age before you can view) My problem is when you goto the link it goes to another url. This is the last thing i tried, but i just get a blank image. $url = "http://www.socom.com/en-us/Clan/Badge?name=the+potheads"; $ch = curl_init(); $fh = fopen("whatever.png", "wb"); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_FILE, $fh); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_TIMEOUT, 10); $response = curl_exec($ch); curl_close($ch); fclose($fh);
-
i know you can crop an image to your sizes, but im tryin to use images like this. http://avatar.xboxlive.com/avatar/Cannibal%20XIII/avatar-body.png The image size itself doesnt change but i wanna know if theres a way to detect the ammount of transparent space at the top of the image. What im trying to do is make a xbox card but the avatar comes out different every time, since the players avatar can range in size. Im not tryin to advertise or anything but heres a better way to explain it. http://yourgamercards.net/xbl/a/Optic%20HECZ.png that image works fine. http://yourgamercards.net/xbl/a/stuey08.png but this one dont.. cuz the avatar size is different so theres more transparent space.. Any ideas??
-
nevermind i found what i needed =) googles a life saver lol.. if anyone else needs to know this is what i did. $result = $db->query("SELECT games.title, games.gameid FROM games WHERE title REGEXP '^[0-9\\.]' GROUP BY title ORDER BY title ASC");
-
Sorry if my title dont make sense. Im trying to pageinate by abc 0-9 and . ive got the abc part to work but i dont know how to include the 0-9 and the . heres what i got. $abc = htmlentities($_GET['abc']); $a = "A"; $letters = range('A', 'Z'); $menu = '<ul class="submenu">'."\n"; foreach($letters as $letter) { if($letter == "A") { $menu .= '<li class="first"><a href="/games/A">A</a></li>'; } else { $menu .= '<li><a href="/games/'. $letter .'">'. $letter .'</a></li>'; } } $menu .= '</ul>'."\n"; if(isset($abc) AND in_array($abc, $letters)) { $games = array(); $result = $db->query("SELECT games.title, games.gameid FROM games WHERE title LIKE '". $abc ."%' GROUP BY title ORDER BY title ASC"); while($array = $db->fetch($result)) { $games[] = $array; } }
-
i never used mysqli or even know the difference really but php.net shows mysqli_num_rows so maybe you need to use that instead of mysql_num_rows
-
still a newbie myself but i think this is the problem.. $run = mysqli_query($connect,$construct); i dont see $connect in the coding.. nvm just seen theres a include for ("includes/connect.php"); which prolly has that var.. but im still thinkin all you need in the query is just $construct i could be totaly wrong
-
Im tryin to write my own xbox api but ive run into a problem. im trying to use preg match all to find, Last Played Online: (.*?) Which is either never or a date (date shown in noscript tags). I get the matches when its never but i cant filter the javascript if its a date. Sorry if im not very descriptive i suck at tryin to explain stuff Last Played Online: <script type="text/javascript"> <!-- _xbcDisplayDate(1, 26, 2008, 2, 15); --></script><noscript>2/26/2008</noscript>
-
What would be the best way anyone can think of for me to store the following info. Game achievments earned users I have no idea how i should store all this info.. Im doing more than just 1 game could be hundreds same with the achievments and users.. ive thought about 1 table per user till i found out its bad.. then i was thinking of 1 table per game then a row for each achievment.. but i dunno where to go from there how i would add the rest of the info or to where and then link it all together..
-
ive already solved my problem with the - by usin multiple tables and assigning the user by the id# anyway why not make a table for every user? with the ammount of info im storing i cant think of a faster way to do what i want..
-
is it possible to use - in the table name?? im creating user tables and im looking for a way to use - in the name or a work around.. anyone know of a way?
-
I was wondering how i would make curl goto every link in an array?
-
im having a small problem.. im using curl and preg_match_all to get this link http://www.socom.com/en-us/Clan/Badge?name=The Potheads off another page which works fine. now the problem is when i try to put the image into a dynamic image it dont work.. i know if you visit the direct link it changes to another one but i just cant figure out how to get the image to display on a new dynamic image.. any ideas how i can get this image to work??
-
figured out what i needed to do.. didnt even need to do what i was thinking
-
im such a newb with php im slowly learning.. can anyone show me how to search an array then store the match to be searched again?? example to help explain.. i want to search the array $id for $user user being from get user then i want to search that string for a more specific match. im really trying to search a array that looks like preg_match_all("/personaId=\"(.*?)\" userId=\"(.*?)\" displayName=\"(.*?)\" nameSpace=\"(.*?)\"/", $html, $id); trying to match the display name first then further match the personaid.
-
if($_GET['user'] == "kipu") { exit(); } worked thanks much.. tried the other way with $user instead of the get and it wasnt working for whatever reason.
-
k ill give it a try later what i get home
-
ok so i have a gamer card script going with help from a few friends, and we noticed a user putting in random junk.. main code is excluded but this is how we are grabbing the user name. my question is how could we make the script stop executing if $user = a certain name? if(!empty($_GET['user'])) { // cache $user = str_replace(" ", "", strtolower($_GET['user'])); // remove spaces and lower } ive tried to use if($user = "kipu") { exit; } but when i do that it stops working for every name..