Jump to content
Killersites Forums

jbwebdesign

Member
  • Content Count

    167
  • Joined

  • Last visited

Everything posted by jbwebdesign

  1. Hello, I am working on creating an angular js directive for using HTML5 Canvas My goal is to output a canvas and use Font Awesome icons for writing inside of the canvas. My code is the following, however the problem i have is that the font awesome icons don't seem to render: angular.module('myApp') .directive('customButtonCanvas', ['$document', function($document) { return { restrict: 'A', scope: { width : '=', height : '=', options : '=' }, link: function(scope, element){ console.log(scope); console.log(element); //first lets
  2. Hello guys, i am trying to create an api request but the problem i have is that the code is not written in PHP. they only have Ruby and Python samples. can someone please help me so that i can create a request to the api with PHP. import hashlib import hmac import urllib2 import time API_KEY = 'YOUR-API-KEY' API_SECRET = 'YOUR-API-SECRET' def get_http(url, body=None): opener = urllib2.build_opener() nonce = int(time.time() * 1e6) message = str(nonce) + url + ('' if body is None else body) signature = hmac.new(API_SECRET, message, hashlib.sha256).hexdigest() opener.addheaders =
  3. Hello, i have been researching some real time functionality and i would like to create a realtime website. something that can function similar to an auction. for this, i would like to use web sockets but i can't figure out how to use web sockets with php. can anyone help me? i have some code below..... server.php #!/php -q <?php /* >php -q server.php */ error_reporting(E_ALL); set_time_limit(0); ob_implicit_flush(); $master = WebSocket("localhost", 8752); $sockets = array($master); $users = array(); $debug = false; while(true){ $changed = $sockets;
  4. I've just looked into some realtime stuff and it looks like Websockets can be good for what i am looking to do. does anyone know weather websockets is the best way for me to go?
  5. Try to use the foreach loop for the entire table....for example: <?php foreach($rotadetails as $rotadetail): ?> <table align="center" border=0 cellspacing=0 cellpadding=0 width=633> <tr> <td colspan=7 valign=top style="height:4px; "></td> </tr> <tr align="center"> <td width="70" rowspan="2">Week <?php echo $i; ?></td> <td width="80" colspan=1 bgcolor="#DBE5F1">Breakfast</td> <td width="80" colspan=1 bgcolor="#DBE5F1">Lunch</td> <td width="80" colspan=1 bgcolor="#DBE5
  6. well what i am trying to do is take the TABLE and convert it into a php array so that i can insert it into a MySQL database.
  7. hello everyone, i am working on a script and i want to do the following i have a table that looks like this... <table> <tr> <td>Tuesday</td> <td>12/31</td> <td>New Years Eve</td> <td>Test</td> <td>Apples</td> <td>Oranges</td> <td>Bananas</td> </tr> <tr> <td>Monday</td> <td>12/30</td> <td>New Years Eve EVE</td> <td>Test</td>
  8. Hello everyone, I am working on a website and i am using AJAX. I am sending requests to the server constantly to have a "LIVE" FEED. I am sending an ajax request to the server to reload a table constantly and another one to reload a different piece of data constantly etc. is there anything bad with doing this? will this run slow if i start to have more traffic?
  9. Hello everyone, i am working on a website that uses facebook api to login with facebook. However i am having a problem with the Javascript and PHP sdk. The problem is that i keep getting an unexpected error which basically expires the facebook Auth Token and then it logs the user out of the website then logs them back in. The code that i am using is below.... <?php require 'facebook.php'; $facebook = new Facebook(array( 'appId' => 'MY_APP_ID_HERE', 'secret' => 'MY_APP_SECRET', 'cookie' => true )); // See if there is a user from a cookie $user = $facebook
  10. Hello everyone, I have been thinking of making a casino (poker) game for iOS/Android/Website/facebook etc. Basically i want a clone of Zynga Poker app for iphone. The problem is that i'm not sure where to start. Does anyone have any suggestions on where i could start to make an app exactly like Zynga Poker?? I don't have much knowledge about Servers or Application Security. Also, if i need to hire a team to make this work, what type of job positions would be needed?
  11. yes there is khanahk but sometimes when you have a Large database to import, that will not work because of php's limitations. so the best solution for that is to run a LOAD DATA query on the SQL.
  12. For anyone who is trying to do something similar to what i have to do which is to LOAD a large database onto phpmyadmin..... here is what i did to solve my issue..... 1.) Login to cPanel and white list your ip address. ( go to the mysql remote access and enter your ip address) 2.) Download a program called MySQL Work Bench 3.) Connect to MySQL Workbench using the ip address that shows on on the left side of your cPanel (in my case it's a shared ip address because i am on a shared hosting account) 4.) After you have connected, create a table with the same fields that appear
  13. hello, i am trying to load a large CSV file in the database and it's not working can someone please tell me what i'm doing wrong?? here is my query for the SQL LOAD DATA LOCAL INFILE '/tmp/2012-8-StandardAreaCodeDatabase.csv' INTO TABLE targets FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' (State,NPANXX,LATA,ZipCode,ZipCodeCount,ZipCodeFreq,NPA,NXX); but i get the following error: #2 - File 'tmp/2012-8-StandardAreaCodeDatabase.csv' not found (Errcode: 2)
  14. i have no idea what the problem was..... but i found a way around it. by the way, i think the switch case statement is working correctly. i am trying to say that if the $_SERVER['HTTP_USER_AGENT'] contains any of the following: ipad, iphone, android, ipod, webos then return is mobile. so that i can re-direct the user to a mobile compatible website. Thanks for your help
  15. Hello, i am trying to understand why this is happening to me..... can someone please explain why when i use a boolean inside of a function, it echo's out the number 1 instead of returning it? I am doing this on a Wordpress website inside of the index.php file at the first line. when it redirects the user, the number 1 appears at the very top of the page. here is my code for trying to use it: <?php if($tm->mobile_check()){ header("Location: http://m.mywebsite.com/"); } ?> here is my code for the function: <?php function mobile_check() /* THIS
  16. Hello, I have been trying to figure out How to calculate the amount of HOURS remaining between 2 datetime fields in MySQL. Can someone please help me ..... I am trying to do something like this: <?php $datetime1 = "2012-08-06 08:46:00"; //this is the later date $datetime2 = "2012-08-05 08:45:00"; //this is the earlier date //I want to return the difference between $datetime1 and $datetime2 in HOURS, MIN, and SECONDS remaining. ?>
  17. Hello, I have a question..... I am working on a script that requires PayPal IPN..... I am trying to code up a subscription based website and for some reason when i test the IPN in the Sandbox Test Site under "Test Tools" for IPN, the script doesn't seem to work if it's in the VERIFIED section. The Script only works when i have the Data above the following lines instead of inside of the "VERIFIED"..... Does this mean that my script would be coded incorrectly? Shouldn't the script be working inside of the code below instead of outside? <?php if (strcmp ($res, "VERIFIE
  18. Never mind, i found my problem! it turns out that since i am using Cufon.replace for the (".gridX3") i can't have white spaces in the HTML coding itself. my new code looks like this: <div class="gridX3"><div class="widget"><h2>Jane Doe, ESQ.</h2><h3>Corporate Attorney</h3> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut est lectus, bibendum eu vestibulum nec, vulputate quis sem. Vivamus nunc neque, auctor non ultricies in, gravida tincidunt massa. Duis eu volutpat ipsum. Sed ultricies dictum nulla.</p&g
  19. Hello everyone, I am working on a website using cufon and i seem to be having a problem with an extra space rendered by cufon. Does anyone know how to fix this? Cufon adds this extra line of code which i don't want: <cufon class="cufon cufon-canvas" alt=" " style="width: 5px; height: 15px; "><canvas width="20" height="19" style="width: 20px; height: 19px; top: -2px; left: -1px; "></canvas><cufontext> </cufontext></cufon> everything else renders properly..... here is my HTML Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
  20. hello, i need help with a code that i am trying to work on. It doesn't seem to work for me at all..... i am using JQUERY SLIDE EFFECTS and i can't seem to get this to work how i want it to. Basically i want to get the image to swap back to "bear.gif" when the effect has finished. Here is my code... $(window).load(function() { $('#slider').nivoSlider(); //polar bear menu action $("#logo").toggle(function(){ $("#polarbear a img").attr('src','images/polarbearcub.gif'); $("#menu").show('slide', {direction: 'left'}, 3000); //after animation is complete i
  21. jbwebdesign

    REST API

    Thanks, i'll check it out. It would be cool to make a video on using REST
  22. What does your grade_post.php file look like?? What does your database structure look like? i'm not sure if this helps but you can try doing something like here: <?php //first build the query.... $re6 = mysql_query('select username from users where course = "BSIT" and yearlevel = "FOURTH"') or die(mysql_error()); //lets create the html form tag outside of our loop. ?> <form action="grade_post.php" method="post"> <?php while($row = mysql_fetch_array($re6, MYSQL_ASSOC)) { //this is where our loop begins.... //we only want to loop our input fields with the
  23. jbwebdesign

    REST API

    Hello, I am trying to build my first REST API. I have been looking all around for a video tutorial on how to do this but I can't seem to find any video tutorials. I was just wondering if anyone can tell me where i should start to learn how to do this? Do i need a dedicated server for in order to build my own REST API??
  24. yes, that was the issue that i was having. It was printing to the browser instead of returning the result and allowing me to store it in a variable.
×
×
  • Create New...