NewStats: 3,265,536 , 8,187,125 topics. Date: Sunday, 15 June 2025 at 04:11 PM 4g16w

6382y

Kehers's Posts 4q3c4k

Kehers's Posts

(1) (7) (of 7 pages)

kehers(m): 11:43pm On Jun 27, 2013
You can Twhii directly from twhii.com
kehers(m): 11:05pm On Jun 07, 2010
Hmmm,

Another way I can think of is masking ur php as js and ing the variables to it via GET like this

HTML:
<script type="text/javascript" src="js/js.php?var=value&var2=value2"></script>

JS (js.php):
<?php
header('content-type:application/x-javascript');
foreach($_GET as $k => $v){
  $$k = $v;
}
?>
var variable1 = <?= $var; ?>;
var variable2 = <?= $var2; ?>;

The drawback however, is that it is assumed the variables are already declared before including the js.
kehers(m): 7:29am On Jun 07, 2010
It is a simple problem. All u did was break one of the 'float' laws. One of the content of ur #mid i.e #mid-left is being floated left. If an element contains an element with a float property, the container elements height is set to null. So since #mid-left is floated left, ur #mid's height wont work.
There are 2 ways to the problem
1. Setting a height for ur #mid (the reason height:600px worked)
2. Floating #mid itself.
Therefore u should be looking into adding a float property to ur #mid i.e
#mid {
float: left;
width: 900px;
background: url(works/mid.png) repeat-y;
padding-left: 10px;

}
BTW, ur #mid-left does not need the height: auto property
Hope that helps.
kehers(m): 8:47am On Feb 28, 2010
@ogzille
Shortcodes r a bit on d high esp for dedicated shortcodes. I cant d cost again now, but u shld b lookg at somethn over 100k plus monthly rental fees of 10ths of thousands. But then again it depends on d provider. And by d way, I will do wit the recommendatn of a good provider myself.
@lojik
Dats interestg. Jst wat I was simulatg in java. Wat lang was it written wit? Can u provide a direct link pls.
kehers(m): 8:45am On Feb 28, 2010
@ogzille
Shortcodes r a bit on d high esp for dedicated shortcodes. I cant d cost again now, but u shld b lookg at somethn over 100k plus monthly rental fees of 10ths of thousands. But then again it depends on d provider. And by d way, I will do wit the recommendatn of a good provider myself.
@lojik
Dats interestg. Jst wat I was simulatg in java. Wat lang was it written wit? Can u provide a direct link pls.
kehers(m): 10:57am On Feb 27, 2010
Yup. But a good shortcode provider can even allow u submit a url dey will automatically forward ur sms to
kehers(m): 12:56am On Feb 27, 2010
Oops, this is kinda deep. It would av been way easier wt a shortcode. The way to it with a number is find a way to listen to incoming messages on the fone and send it to a script (say via a url) dat does d db insertion. Two ways to this is dat 1. U develop a mobile app dat does d listeng & uses d fone's gprs to 4wd it to d url dat will do d db insert. I av done it in java (j2me) once but flopped due to the security restrictns of java. So most def, u should b lookg into a different programmg lang like python or symbian C (dependg on d target fone)
2. Connect d fone 24/7 to a pc and write a desktop app to access incoming msgs on d phone via d connectn port - just as all ds pc suites do.
My advice? Use a shortcode. The provider will give u api with whc u can easily get incoming sms.
kehers(m): 7:05pm On Jan 07, 2010
Sorry for not been clear. Mean to say SMS shortcode - those 4 to 5 digit numbers popularly used for txt promos and co
kehers(m): 1:43pm On Jan 07, 2010
Anyone knws whr i can get a temporary short code I can use for some demo?
kehers(m): 10:10pm On Jan 05, 2010
Never found the reason to implement OpenID but its not that difficult. There are a couple of libraries available to help. One of this [in php] is available here - http://openidenabled.com/php-openid/ and u can find an intro article here http://www.plaxo.com/api/openid_recipe
But so u know, its not everyone that mind ing across multiple sites. Personally, I dont. Most of this authenticatn standards (openid, oauth, ) mess up at times - especially with poor internet connection.
Gud luck.
kehers(m): 12:30pm On Oct 19, 2009
Just to chip in that mysql_escape_string() on the other hand doesnt require a connectn to d db. But then it is depreciated sad
kehers(m): 4:35am On Sep 27, 2009
Too bad I missed out on an interesting topic like this sad
Ok, to start with, I'd go for file storage for session storage due to scalability. Storing in db actually rocks for alot of reasons. For one, you have easy access to session data, can easily kill/manipulate sessions, count visitors online, blah blah blah, but then comes the big cross - scalability. Developers that have handled big sites will understand better. Database resources are costly (in of memory and U) and where ever possible, it is better to limit this. Saving sessions in db consumes a minimum of 2 db access (one for initial data read, and the other for data write at session end) per page per , and this does not scale well especially if the pages performs other db activities.
But really, there is nothing u can achieve with storing sessions in db that u cant achieve wt storing in file. If u know of one, let it out. And if u must go the db way, I think it is better to use a different db server (like sqllite) so that if anything happens to d db, other non-session data are still safe.
kehers(m): 4:01am On Sep 27, 2009
@zsulu
20 milli cool ? Deg the next facebook? LOL, just kidding
But really u will av to get on a dedicated hosting to take care of that.
kehers(m): 2:25pm On Sep 10, 2009
D site is really really beautiful. One thing though, the links could use some :hover (mouseover) gestures. For example, it wont be a bad idea to change the background of d any 'mouseovered' link on the main nav (the one wit d green background strip) to another color. Same wt d 'Learn More' button as well.
I also noticed the footer links are not hyperlinked. Guess ds is coz of d WIP. Just noting though in case its a slip.
But then, it is a really simple and beautiful design.
kehers(m): 2:59pm On Sep 08, 2009
@yawatide
So why didnt u take up d task to notify d person in charge in the first instance? Is it dat u find fun in doing this? Just asking, coz wat u just did might av cost someone his job.
kehers(m): 2:56pm On Sep 08, 2009
@biggjoe
You did the right thing man. 2 big thumbs up to you. That wouldnt av been intentional. It most def must av been a hack or trojan, which might have come from the server. This is the internet, shit happens.
kehers(m): 1:16pm On Aug 25, 2009
Im using event handlers from a framework (prototype to be specific) to attach listeners to certain elements of a page like this:

//html
<a href="?default=1" class="default">Set Default</a>
//js
document.observe('dom:loaded', function(){
//get all elements with d 'default' classname
for(i = 0;i < document.getElementsByClassName('default').length;i++)
{
s = document.getElementsByClassName('default')[i];
//attach an onclick event
s.observe('click', function(e){
//prevent the default action (i.e following the link)
e.preventDefault();
//read d link attribute
ref = this.readAttribute('href');
//and now, do it the ajax way
new Ajax.Request('js/ajax/handler.php'+ref, {
method:'get',
onSuccess:function(transport){}
});
});
}
});
It works well. Really well. But there is a challenge. Most times, such actions manipulates the DOM and may add one or more of the 'default' class element (i.e another <a href="?default=1" class="default">Set Default</a> somewhere). That is intentional actually. But then, the newly added 'default' class element will not have the click event attached. The shitty work around at the moment is to loop through all the 'default' classes again and re-attach the events. Any other better ideas?
kehers(m): 1:00pm On Aug 25, 2009
@webdezzi
Sorry for d late reply. Here: 08066887840
kehers(m): 1:26am On Aug 23, 2009
@webdezzi
I use PHP solely for server side web development. I do J2ME for mobile development though.
kehers(m): 2:01am On Aug 22, 2009
Q 1. To achieve this you will need to create a processor script - I mean a script that handles the content, does the counting (probably by incremementing a count field stored in a db with the filename or file id as key) and sending the content to the . This is coz normal linking to the file like this: http://mysite.com/file.ext wont work for d count.
A simple analogy to the processor script (in PHP) is this:

//mysite.com/.php?fileid=someID
//Get the original file, mime type and source from where-ever its stored (db for ex) using fileid GET field
if (is_file($path_to_content)) {
header("Content-Type: ".$mime_type);
header("Content-Length: ".filesize($path_to_content));
readfile($path_to_content);
//Do your count here by setting the db count field for this file to + 1
}
else {
// some error,
}
By the way, why do u want to count before ing? Why not after? If you also have an intermediate knowledge of PHP (and you are scripting wit it), check out the PEAR Package: HTTP_ (http://pear.php.net/package/HTTP_)
Q 2. Save in a secured folder (as suggested by Cactus as well). DB storage is more resource consuming.
kehers(m): 5:55pm On Jul 16, 2009
@biggjoe
If the enctype attribute of the form tag is not specified as "multipart/form-data", the file input field interpreted as normal text input field and it is just the path to the image that is posted.
kehers(m): 4:37pm On Jul 16, 2009
The hidden max_size (as webdezzi noted) is just to take care of things on the client side. It is similar to using javascrript to prevalidate before the content goes to the server for server validation. Of course, we know it is possible the max_file_size hidden input is edited (increased) by duplicating the html code somewhere else, so it is essential the size is as well validated on the server side.
PHP for example stores the size of the ed file in $_FILES['filename']['size'] so u can easily validate against dat on the server side.

<?php
,
if($_FILE['name']['size'] > 1024*1024*3){ //max of 3MB
//bounce
}
,
?>
I dont know for other languages sad
kehers(m): 6:38pm On Jul 15, 2009
Dats probably coz u didnt specify d correct enctype for d form,
here:

<form enctype="multipart/form-data" action="__URL__" method="POST">
<!-- MAX_FILE_SIZE must precede the file input field -->
<input type="hidden" name="MAX_FILE_SIZE" value="30000" />
kehers(m): 3:29pm On Jul 11, 2009
Hmm, one reason could be that the div's content doesnt extend to the image's height. If it's that, the way to it is giving the div a min-height hat is equal to the height of d image. Hope Im not misinterpreting ur question grin
kehers(m): 3:44pm On Jun 30, 2009
Yeah, yeah, md5 is not a 100% fool proof way of encrypting db s. But then, na naija we dey now, au many people really care about going that extra mile to hack u down (except of course u are interswitch or so  grin ), so its no crime running ur encryption on md5. But for the word sha, md5 is not 100% safe (search around d web for rainbow tables and u'll understand.)
Iv stop to use md5 for a while now. I use a hashing algorithm u can check out here: http://www.openwall.com/ph/ It gaurantees better encryption security
kehers(m): 1:40pm On Jun 28, 2009
kehers(m): 2:52am On Jun 27, 2009
@yawatide
Nah! You have a misconceptions there. Use to think of it that way too initially.
Twitter simply helps keep tabs with things that are of real importance and interest to u. By following people that share ur interests, say programming or web deg for example, you get to relate and share ideas as regards that. You wont really understand till u give it a shot. Not trying to convince you though (or am I?) but really, its worth it.
And by the way, ofcourse there is the 'joblessness' part as well, but thats up to u to decide if to belong there
kehers(m): 3:22pm On Jun 26, 2009
kehers(m): 9:29am On Jun 26, 2009
@dhtml
Didnt know Google's checkout can be used to accept payments within the country. Only know u can use it to make payment. How well does it work?
kehers(m): 12:46am On Jun 26, 2009
@webdezzi
shocked
kehers(m): 12:24am On Jun 26, 2009
It depends on how you want to use it, directly from the site or from another source (another site for example) via API.
If you will be using it from the site, then there are a couple of naija sites there that are really cheap (infact some claims as low as N3 wen u make bulk purchase). Examples are aratext.com and dudumobile.com
If u want to use from an external source however, via API, then, hmmmm, so far, locally, smslive247 is still dat naija sms gateway I give it to. Use it every now and then. But then, I think N6.5 (that they charge) is kinda costly.
kehers(m): 12:13am On Jun 26, 2009
GTB CC works for them, used it once.

(1) (7) (of 7 pages)

(Go Up)

Sections: How To . 48
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or s on Nairaland.