Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by techker

  1. i see....so im guessing i need to manipulate the EXIF on uploading...uhh
  2. Odd if i take a picture with the phone it rotates it side ways.. if i select a picture its ok.. does the phone insert a setting or something in the picture??lol
  3. Hey guy's im stock on this issue.. my image up loader works good , it uploads and resizes ok on my PC i select a picture and it uploads correctly, My girlfriends PC uploads the image sideways?? on cell same issue?Sideways? <?php function resizeImage($resourceType,$image_width,$image_height,$resizeWidth,$resizeHeight) { $imageLayer = imagecreatetruecolor($resizeWidth,$resizeHeight); imagecopyresampled($imageLayer,$resourceType,0,0,0,0,$resizeWidth,$resizeHeight, $image_width,$image_height); return $imageLayer; } if(isset($_POST["form_submit"])) { $imageProcess = 0; if(is_array($_FILES)) { $new_width = $_POST['new_width']; $new_height = $_POST['new_height']; $fileName = $_FILES['upload_image']['tmp_name']; $sourceProperties = getimagesize($fileName); $resizeFileName = time(); $uploadPath = "./uploads/"; $fileExt = pathinfo($_FILES['upload_image']['name'], PATHINFO_EXTENSION); $uploadImageType = $sourceProperties[2]; $sourceImageWidth = $sourceProperties[0]; $sourceImageHeight = $sourceProperties[1]; switch ($uploadImageType) { case IMAGETYPE_JPEG: $resourceType = imagecreatefromjpeg($fileName); $imageLayer = resizeImage($resourceType,$sourceImageWidth,$sourceImageHeight,$new_width,$new_height); imagejpeg($imageLayer,$uploadPath."thump_".$resizeFileName.'.'. $fileExt); break; case IMAGETYPE_GIF: $resourceType = imagecreatefromgif($fileName); $imageLayer = resizeImage($resourceType,$sourceImageWidth,$sourceImageHeight,$new_width,$new_height); imagegif($imageLayer,$uploadPath."thump_".$resizeFileName.'.'. $fileExt); break; case IMAGETYPE_PNG: $resourceType = imagecreatefrompng($fileName); $imageLayer = resizeImage($resourceType,$sourceImageWidth,$sourceImageHeight,$new_width,$new_height); imagepng($imageLayer,$uploadPath."thump_".$resizeFileName.'.'. $fileExt); break; default: $imageProcess = 0; break; } move_uploaded_file($fileName, $uploadPath. $resizeFileName. ".". $fileExt); $imageProcess = 1; } if($imageProcess == 1){ ?>
  4. true. i will check that option.thx for the help
  5. sorry ya.the admin adds credits. and i have a counter that shows the amount left
  6. lol..you knownwhennyou think to hard about something and it ends up super simple... the update is did not know the LIMIT could be the solution.. thx for the help!is you need some tv PM me.
  7. Ok np table users contain knly user information name , email... tables codes have all the codes lime 100 codes. in this table id code value status(used or not) UserId this is were j want to assign a user to the code so i have one database and in my query i filter the codes according to the userId
  8. ok its for an iptv business they buy credits in codes lets say he buys 100 drop them in the database.with his pannel he could have resellers. so that is why when he regiaters a reseller they get 25 credits. when they run low there is a warning and they can't sell to clients if they are under 5. in the main admin he see's the total amount of credits and reseller credits. when is database of 100 codes get low he need to buy more and fill it up. so that is why i want to be able to when he registers a reseller to assign 25 codes in the database automatic , not mannuelly go to the database and and do one by one. is this more clear?
  9. sorry forgot , 1 code 1 client, depends on how much he paid
  10. ya i have i put all the codes in the database and have a counter on the site. so i would now when im running low
  11. i have my table User Table Codes id id username Codes pass Status dateIn UserID Credits So your saying to create a table to have the user codes? can't i just update the codes datbase and add the userID to all 25 codes? so when i select codes i filter UserID
  12. Hey guys i have a database User and a database Codes (all codes) When we add a new user i would like to be able to put the amount of codes needed it would select in the codes database and put his userID so add User assign 25 codes to user in database user it would automatically add the UserID to 25 codes.. it's clear in my head..lol but is this clear?
  13. its odd cause im getting an error connection refused.. but when I use postman it get the son data
  14. Hey guy's im calling an api and getting back { "user_info": { "username": "u", "password": "p", "message": "", "auth": 1, "status": "Active", "exp_date": "1521306691", "is_trial": "0", "active_cons": "0", "created_at": "1518887491", "max_connections": "1", "allowed_output_formats": [ "m3u8", "ts", "rtmp" ] }, "server_info": { "url": "server", "port": "25461", "rtmp_port": "8001", "timezone": "Europe/London", "time_now": "2018-03-06 14:05:59" } } im trying to parse in ph to get username and password. I have tried lots of ways but no success? example : $data = json_decode(file_get_contents($url), true); echo "id: ", $data['user_info']['username']; echo '<br>'; echo "Name: ", $data['password']; echo '<br>'; or $obj = json_decode($url2); print $obj->{'username'}; or $jfo = file_get_contents($json_file); // read the title value $title = $jfo->server_info->url; // copy the posts array to a php var $posts = $jfo->user_info->username; no luck?do I have to use like a multilevel son method?
  15. hey guys it works but i tried from another ip and it inserts it... i need it to run one time only...
  16. i fixed the syntax error but still don't see why my if statement would always fail? thx for the info on mac i will check it out. Edit i think i found it..( '$ip' ) seems to work
  17. hmm good point.thx i will correct that...
  18. i did it works but it still inserts all the time the same ip..
  19. when you says nrowsx is not defined?what to i set it to?
  20. uh..ok.. but it always inserts it every time i refresh the page or login?
  21. I know they change bot the boxes are always in the house unless the house ip changes also..would like to log mac but can't seem to get that going due to routers blocking it.. i check in my login page if it is not in my database i register it. $DateIn = date("Y-m-d"); $result1 = $DBcon->query("SELECT * FROM AuthIp WHERE IP = $ip LIMIT 1"); $nrowsx = mysql_num_rows($result1); if (nrowsx == 0) { $result1 = $DBcon->query("INSERT INTO AuthIp (IP,Name,Email,Status,DateLocked) VALUES ('$ip','','','$Status','$DateIn')")or die(mysql_error()); $Msg = 'Your IP address is now Set to :' .$ip . '<br />'; } else { $Msg = 'Your IP address is in Database'; //in db already'; } but it always enters it when i logout out and login..
  22. Hey guy's i have an app that im building with a webview that points to my servers. the app is made to check status of services and renew. i did a login just by email and would like to add ip restriction so on first boot of the app it would log the ip only once and lock it. so when i look for email on login i can check to see if the email is the same.. it's the first insert that im stock on. once that is done the rest is ok.
  23. Thx for the reply's, ya there is a few things to see..lol i have access to all in my cpanel .i will look in to this devops tool you are talking about.looks like a good idea. thx@gizmola
  24. Hey guy's have a few friends that need an admin panel to manage there clients and information So i created a script and did the panel ..but im debating on how do i share this. i created a domaine and database but if i have 3 guy's that need it for there own clients.Do i create sub domains for each and individuel databases or one database with like a RepID field in the tables to filter each login's and clients that are associated to this admin... or do i create a database for each so it can be safer and less heavy in long terme.. if so is there like a script that i can do that can create a sub domain and database and insert all the tables and files...lol or is it pushing it.. Thx Guy's
  25. just video tags? but im guess that it needs to read the fileand list all the channel and epg guide.then when you click to view video
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.