May 10

Today i found this very cool tutorial regarding the using of using ssl with PHP.

I’ll copy here the most interesting of it.

HTTP with PHP Sockets

// don’t need to specify http, it’s the default protocol
$hostname = “www.google.com”;
$port = 80;

// create and configure the client socket
$fp = fsockopen($hostname, $port); // optional: $error_number, $error_string, $connect_timeout
if ($fp) {
stream_set_timeout($fp, 30); // seconds to wait for i/o operations

// send request headers
fwrite($fp, “GET / HTTP/1.1\r\n”);
fwrite($fp, “Host: $hostname\r\n”);
fwrite($fp, $additional_headers); // Accept, User-Agent, Referer, etc.
fwrite($fp, “Connection: close\r\n”);

// read response
$response = “”;
while (!feof($fp)) {
$response .= fgets($fp, 128);
}
echo $response;

// close the socket
fclose($fp);
}
Continue reading »

Apr 17

I needed to create a backup on my mysql database on remote host. I found out that there is a way that you can actually do that with mysqldump :). I didn’t believe that it will be so easy but i decided to give it a try. After all the stuff i read on the net about it there was’nt a single working example of it - so after some testing i managed to do it :)
so here it is:

first i will show you how to use mysqldump to backup your database on your harddrive on your local computer under windows. Go to your command prompt -> Start -> Run -> write “cmd” -> hit enter
go to your mysql bin directory, in case that you use xampp, and it’s installed on c:\xampp, it should be in c:\xampp\mysql\bin
you can do that by typing “cd \” and then “cd xampp\mysql\bin” (i’m trying to write this tutorial as simple as possible so that everybody will get it :) )

after that, to backup your database on local mashine you should write:
mysqldump –add-drop-table -h localhost –user=root –password=yourpass yourDBname > OutputFile.sql

voilla :)

so if you want to backup your database to remote host the command gets a bit more sophisticated ;)
here we go:

copy databse and it’s data from one server to another:
mysqldump –user=root –password=yourPassword –opt localDB | mysql -h 192.168.1.35 –user=root –password=remotePassword remoteDB

In our case we copy our local database “localDB” into the database “remoteDB” on the machine with 192.168.1.35

we can also do the command like this:
mysqldump -h 192.168.1.17 –user=test –password=12345 –opt remoteDB
| mysql -h 192.168.1.51 –user=root –password=bg_820918 remoteDB

in this case we copy the database “remoteDB” from remote host to another remote host in the database “remoteDB”

now you see how powerfull mysqldump really is, and that’s only few of the things it’s capable of :)
I hope this will was usefull for someone :)

Apr 08

Hello fellas,  because these days i had a case where i had to include some RSS feed on my site and i needed a very simple and fast solution in php how to do it i was very dissapointed from what i’ve found on the web. There are all kind of widgets, tools PHP scripts using the xml-reader class, whatever - but i just needed some very simple solution. So ofcourse i had to write it myself at the end :)

in this example i’m going to import feed from yahoo’s technology news rss:

Continue reading »

Mar 30

I’m going to talk about some good object oriented practices for small/medium projects. The object oriented programming itself will save you enourmous amount of time. The inheritance is part of the Object Oriented Programming (OOP) and is very good thing that is going to save you even more time when you start to use some object oriented model in your programming.

Let’s say we need to have some root class - lets say “Base”, with the __construct() (the class’s constructor) - notice that since PHP 5.0 the constructor of a class is defined in __constructs(), instead of “the-name-of-your-class”(). Anyway you can define the constructor information in Base() as well, but better do it in __construct, because you don’t know if there will be support for the old PHP 4 constructors in PHP 6 :)

so let’s get on business..
Continue reading »

Mar 20

I don’t know if this will be interesting for you, but it was very interesting for me when i found that it is very easy to modify header information and send POST/GET variables through header using php. Anyway with CURL you are able to do much more that just modify the header information etc., but we wont have that time-frame :)

I will give you simple example where i login through script on localhost on some site - in this example: “gametrailers.com” - without actually enter any username and password :), i think this will be the easiest way to understand it.

so here is the example:
Continue reading »

Mar 19

Hello :) today i’m going to talk about resizing your the images in your site.
So let’s say for example that you have a CMS system - like Joomla for example. In the administration you usually have functionality like - uploading images and linking them in your content.
But often the problem with that is that usually the customers will upload too large images (copied in raw jpeg directly from their cameras) and when they link them to the content of their website, it get’s really messy.
Anyway you can fix this by writing some script that directly resize the image to some resolution like 500px/* for example, but what will happen if you want to put lightbox or something other to show the image in large resolution, or you just want to put some function to download the original file etc. You simply can’t because the image was resized at the moment it was uploaded on the server.

How about dinamically resize the image at the very  moment that client requests it?

So that way we wont have a big image that the client has to download, and at the same time we will still have the original, good resolution copy of the image, in case that we need it. We can also use the following PHP script for creating thumbnails.

Well - as you will see below it’s not hard at all to do it,  i mean not hard at all :)

Continue reading »

Mar 12

This is metal gear solid kind-a game W. i highly recommend it if you have’nt tried it before. You come in the role of the bad alien that kills FBI agents, and in the same time unknown why you must have to kill all sorts of weird robots etc. This is very classic game so don’t miss it ;D

alien arcade flash game

if you want to play the game - click Continue reading

Continue reading »

Mar 11

Hello :),
these days i was making a lot of compliments about Windows 7, i was telling my friends how fast and stable it is, even that it’s still in Beta :). Well i think that it is double as fast compared to Vista, double as stable, double …. blablabla
… and also you have double the toolbars, double the menu items double everything :D

Mar 11

shibaku

If you see the image first - u will probably think - oh no this is some kind of sims flash game, or something like tycoon game where i have to build things and make money etc.

Nothing like that - Shibaku can’t be compared to any other game - in shibaku you can decide which technologies to develop more than others, and from that point on you have dozens of different scenarios in which the game will develop. Anyway if you choose good way to develop and grow your town you can get to level 10 and beat the game - unfortunately i just got to level 9 after million different scenarios :D Just give it a try - u won’t regret it :) - To play the game click the - “Continue reading” button .

Continue reading »

Mar 10

tunnel flash game
Long time ago i found that amazing flash game. I managed to get to level 8. I dunno if someone ever beaten this game - btw this game will be harder for u if ur computer is faster cuz it will run like hell on the later levels :D
Click on “Continue Reading” to play the game

Continue reading »

  • generic name viagra
  • viagra trial pack
  • european online pharmacy
  • new stop smoking medication
  • health vitamins
  • online discount pharmacy
  • pet ear infection remedies
  • pain management drugs
  • nerve pain remedy
  • organic vitamins
  • antibiotic overdose
  • how to lower high blood pressure
  • bone muscle pain
  • cancer medicine
  • effexor dosages
  • latest treatment for heart attack
  • buy brand names drugs
  • allegra drug
  • heart chest pain
  • bactrim online
  • tretinoin retin a
  • discount medication
  • clonazepam treatment
  • genaric viagra
  • taking diflucan
  • what can help heart failure
  • no prescription pain
  • how to relieve back pain
  • levitra side affects
  • dog health advice
  • leukemia medications
  • congestive heart failure online
  • help reduce high blood pressure
  • levitra warfarin
  • free ultram
  • treating aids in africa
  • how can i stop smoking
  • on-line drugs
  • benadryl dosage
  • prevention of hypertension
  • buy cialis online viagra
  • cialis herbal
  • flu shot
  • buy cialis tadalafil
  • what is elavil
  • weight loss information
  • male enhancements
  • aspirin therapy
  • strengthen immune system
  • viagra women
  • dog antibiotics
  • us online pharmacies
  • nolvadex generic
  • benicar generic
  • do diet pills work
  • parasite killer human
  • treatment of chlamydia
  • what valium does
  • weight loss stuff for free
  • cialis cheapest
  • natural health for dogs
  • arthritis pain medicine
  • gout cures
  • high blood pressure prevention
  • cla buy
  • pet ear infection remedies
  • generic 5mg proscar cheap
  • cheap impotence drug generic cialis delivery
  • weight loss pill that works
  • allergy medication
  • new weight loss drug
  • natural antibiotic anti-biotic
  • diabetes prevention
  • rheumatoid arthritis medications
  • medication gonorrhea
  • alzheimers meds
  • cialis benefits
  • medications ativan
  • drug hydroxyzine
  • meds without prescriptions
  • mens health supplements
  • baby acne
  • birth control online
  • pet supplies products
  • do diet pills work
  • cheap viagra soft
  • nexium use
  • cialis versus viagra
  • female health problems
  • abnormal blood clots
  • buy cialis without a prescription
  • breast augmentation info
  • new drugs for depression
  • arthritis pain medicine
  • cholesterol canada
  • what is hoodia
  • osteoporosis help
  • abscess infection cats
  • health products for men
  • treatment for high blood pressure
  • levitra generic
  • treatment of breast cancer
  • mobic tablets
  • strattera pharmacy
  • drug sarafem
  • carisoprodol dosage
  • women's health tips
  • viagra from usa
  • chest pain
  • allergy medicine
  • blood clots lungs
  • buy drugs online
  • teeth whitening methods
  • buying prescription drugs online
  • how to lower blood sugar
  • parkinson's drugs
  • lexapro info
  • asthma asthma
  • cialis 50mg
  • new levitra
  • severe hair loss
  • pain medication safe while pregnant
  • male health vitamins
  • otc sleep aids
  • vitamin b-12
  • high blood pressure treatment
  • carisoprodol medication
  • living with heart failure
  • diabetes cure
  • women body building
  • cat's health
  • buspirone dosage
  • diet for high blood pressure
  • generic viagra lowest price
  • bupropion 150 mg
  • information on gout
  • what does clomid do
  • medication price
  • weight loss tablet
  • top weight loss drugs
  • discount skin care
  • amitriptyline uses
  • where to buy cialis
  • online cheap soma
  • order alli
  • stomach pain
  • xanax price
  • buy canadian drugs
  • bronchitis medications
  • weight loss tablet
  • pet safety products
  • preventing bone loss
  • advice care health pet uk
  • discount pharmacies in canada
  • natural sleep aid
  • super flu
  • prostate cancer treatment
  • treating dependent edema
  • herbs for impotence
  • wrinkle reducers
  • cheapest cialis generic
  • cheapest cialis uk
  • dog health care
  • cialis 5
  • smoking cessation programs
  • generic online ultram
  • adhd in children
  • valium high
  • pet safety products
  • medicines for insomnia
  • human parasite
  • simvastatin tablets
  • free diabetes products
  • online prescription pharmacy
  • pet med
  • purchase vitamins
  • penis enlargement result
  • medication skelaxin
  • buy body building supplement
  • burning fat
  • left side pain
  • depression drugs
  • pain drugs
  • tramadol and dosage
  • discount weight loss prescription
  • weight loss exercise tips
  • drugs online
  • teeth white
  • stop smoke
  • sildenafil online
  • professional viagra
  • blockers calcium channel
  • avapro 150mg
  • fda levitra
  • blue pills
  • pain medicine online ordering
  • male health drugs
  • chronic congestive heart failure
  • normal blood pressure
  • stronger erections