premiso
Members-
Posts
6,951 -
Joined
-
Last visited
-
Days Won
2
Everything posted by premiso
-
pr0n is the way to go. Those websites crank in the dough. It is pretty crazy how much they bring in. Alternatively, (a bit off topic) I have heard opening your own Liquor store is a great way to make money as well. As they tend to do a 90% increase on price of liquor from what they buy it at. Just pick a good area (rich area is probably better) and voom.
-
Give this a read: http://www.codewalkers.com/c/a/Miscellaneous/Create-Your-Own-Custom-API/ As far as needing an API, you may have legitimate needs, but you have to have a plan, know where you want to go with the API. What do you expect the API to do? And ask yourself different questions to get to where you are going. You have to have a plan before you can even think about implementing.
-
Why not look into using sessions you can change the session_set_cookie_params to make it last longer than a browser close. This way all data is housed on the server still and just the sessionid is stored in a cookie on the user's box. A bit more secure than using cookies for everything.
-
So IE has a known problem with caching iFrames that do not do "unique" requests. Give this a try and see what happens: <iframe frameborder="0" src="http://clients.mindbodyonline.com/ws.asp?rand=<?php echo rand(111111, 999999);?>&studioid=<?php echo $_GET['studioid'];?>&stype=<?php echo $_GET['stype'];?>&sView=<?php echo $_GET['sView'];?>" title="Gentle Journey Online Booking System" width="915" height="1000" align="middle"> </iframe> It should make it look unique each time so IE does not choose to cache it. Let me know if it works.
-
It is funny what people think is "simple". I mean honestly if it was really simple, I would hope that you could figure it out. Change this part: for ( $i = 0 ; $i < (strlen ( $chunk ) - 1); $i ++) { And this: if ( $j < (strlen ( $chunk_md5 )-1)) { The issue is your increment is probably going 1 too high since you are starting at a 0-base and strlen returns the length starting at 1 not 0. EDIT: Strike the edit
-
[SOLVED] Sending my html page using PHP mail function
premiso replied to matt.sisto's topic in PHP Coding Help
Glad you were able to figure it out. If it is not too much of a hassle mind posting what you ended up with that worked, in case it may be of further assistance to another user? -
Seriously, all caps in titles are freaking annoying as all hell. And it is against the rules/terms of service you did agree to when registering/logging in: #2 under the Forum Guidelines So please, do not do it as you are saying your matter is more important than someone else's. If it is that urgent post in the freelance section and pay someone to do it. Honestly, I ignore all posts that have caps in the title due to the disrespect it gives other users who obey the rules. Following the guidelines will help your topic get answered faster than not following them. And being an asshole certainly will not motivate anyone to help you out. Thanks.
-
If you want to be a network administrator (Cisco certified etc) I would get a bachelors degree in college. I know my brother in law is CCNA and CCNP certified and he was pissed that he could not get a decent job without having his bachelors so he went back to college and got that. A bachelors degree will help immensely, along with the certifications. But I would also say, we worked on Cable/Networks/Security camera installing for about 7 years (this was the time he had his CCNA/CCNP) and then decided to get a bachelors degree so he could go into a company instead of running his own business. So he had all the experience, but in the end it was the degree that weighted most.
-
So you found that function in the user comments somewhere? Well that function you found the creator most likely did not have probably works the same as http_get if you do not have PECL installed. So it worked for him. EDIT: I do not think it works the same. Either way to use it, change your function name to something like : function my_http_get and your script should work just fine, given that function does what you want. If not maybe the http_get function does what you want and you do not have to use a user-defined function.
-
Hes a PC junkie. He gets off on Windows/Linux...seriously.
-
http_get You sure are re declaring it. I am sure google would have enlightened you to that function.
-
Incase that was directed towards my code... glob returns an empty array. So it is not counting a "null" variable, it is counting an array that contains no items. Just an FYI on that.
-
If you were being serious that you just want to "echo" and if statement then this would work: <?php echo 'if (mysql_num_rows($img2query) > 0) { echo \'<img src="' . $row['imgpath2'] . '" width="125" alt="" />\'; }else { echo "No picture yet."; }'; ?> Notice that you had width='125' which was wrong because you were echoing inside of single quotes. Changing it to width="125" should fix that. Are either of the solutions posted in Reply#6 or this reply the ones you are looking for? If not than no I do not understand at all what you are trying to do. EDIT: Fixed error.
-
<?php $dir = "directory/subDirectory/"; if (is_dir($dir)) { $dirContents = glob($dir . "*"); if (count($dirContents) > 0) { foreach ($dirContents as $file) { if(!is_dir($file)) include_once($file); } }else { echo "<h1>Directory is empty</h1> <h2>Thank you please. Come again.</h2>"; } } ?> I prefer glob but that is how I roll.
-
I sure do not, but apparently nrg_alpha does:
-
Change width='125' to be width="125" A simple syntax error. I would read up on PHP syntax and or invest in using a color coded PHP Editor. As that error really is plain to see. EDIT: You do realize that it will just print the actual statements. The smartass remark made about echoing if statements was because you chose your wording for the question very poorly. <?php if (mysql_num_rows($img2query) > 0) { echo '<img src="' . $row['imgpath2'] . '" width="125" alt="" />'; }else { echo "No picture yet."; } ?>
-
[SOLVED] Anybody have a script for a "1 Day ago","13 minutes ago" ?
premiso replied to mazman13's topic in PHP Coding Help
http://snippets.dzone.com/posts/show/3044 Found by googling php time since -
You got lucky today. I just finished my Simple SQL Search tutorial. Hopefully that helps you out! EDIT: It is not "everything" you want, but that should get you rolling on it.
-
$data is an array....You can do this, but you need to figure out why it is an array: function addentities($data){ if (is_array($data)) $data = implode(" ", $data); if(trim($data) != ''){ $data = htmlentities($data, ENT_QUOTES); return str_replace('\\', '\', $data); } else return $data; } That will basically convert the array to a string, but you are expecting a string, the answer is not here. It is where you are calling that function, not where it is defined.
-
Options -Indexes Add that to a .htaccess file in the directory you do not want to be listed.
-
What happens when you go directly to that site in MSIE (not in the iframe)? Does it work?
-
Don't hijack, create your own thread.
-
[SOLVED] Create a MySQL INSERT from a previous SELECT with 2 values changed
premiso replied to SoWhy's topic in MySQL Help
Nope. It will not. Give it a try. However, I did set it up wrong. This would be the proper way to do that: $newSQL = "INSERT INTO table (`" . implode("`, `", $cols) . "`) VALUES (" . implode(", ", $vals) . ")"; Note the backticks after the ( and before the ) Or if you choose to omit the back ticks: $newSQL = "INSERT INTO table (" . implode(", ", $cols) . ") VALUES (" . implode(", ", $vals) . ")"; Should work as long as you are not using a reserved word for a column name. -
[SOLVED] Create a MySQL INSERT from a previous SELECT with 2 values changed
premiso replied to SoWhy's topic in MySQL Help
You should really post exactly what you want and what you have tried in the future. As it seems you are asking us to write the code for you. If your table has that many columns then you can dynamically generate the SQL like so, as far as fenway's suggestion about columns I would agree. $vals = array(); $cols = array(); while ($row = mysql_fetch_assoc($result)) { foreach ($row as $col => $val) { if (!is_numeric($val)) { $val = "'" . $val . "'"; } $vals[] = $val; $cols[] = $col; } $newSQL = "INSERT INTO table (" . implode("`, `", $cols) . ") VALUES (" . implode(", ", $vals) . ")"; mysql_query($newSQL); } Should generate your SQL for all the columns in that table. If you want to do the value switching you will need to add some logic inside the foreach. The above is untested.