refers to two Access databases
Friday, January 28, 2011
Im On A Boatparty Costume
If we took the management of the country, such as sports, we would be the best country in the world.
works and strive.
With humility and respect. Combat
dark.
say is the light that we have lost.
Monday, January 10, 2011
Congratulation, Giving Birth
Messenger 2009 Error code: Installing MySQL on 8,000,401th
This messenger error code 2009 is produced by a corrupt key in the Windows registry. To resolve this problem follow these steps:
1) entry into the Windows Registry
To access the Windows Registry does not go to: Start -> Run and type regedit
Click OK and you will see a window like this
2) We eliminate the corrupt key
Once inside the Windows registry we go to HKEY_CLASSES_ROOT \\ AppID \\ and remove the key
380689D0-AFAA-47E6-B80E-A33436FE314B
Messenger Now you can enter 2009 without problems
This messenger error code 2009 is produced by a corrupt key in the Windows registry. To resolve this problem follow these steps:
1) entry into the Windows Registry
To access the Windows Registry does not go to: Start -> Run and type regedit
Click OK and you will see a window like this
2) We eliminate the corrupt key
Once inside the Windows registry we go to HKEY_CLASSES_ROOT \\ AppID \\ and remove the key
380689D0-AFAA-47E6-B80E-A33436FE314B
Messenger Now you can enter 2009 without problems
Friday, January 7, 2011
Does San Diego Zoo Sale Beer
Today I show you a script I've done in php which given a url (asking first), download all images (public) of that page to our server (if we test from localhost obviously download our PC).
The second creates a copy for each image in the local machine within the images folder. Without further ado I leave the code:
imagenesHTML
(
= true
)
{$ content = @
file ( $ url); $ content = array_map (
"trim" , $ content); $ content = implode
( " , $ content); if (preg_match_all (
'/ \u0026lt;img ([^\u0026lt;>]+)>/ i' , $ content, $ match )) { foreach ($ match [
1] as $ attribute ) {if ( preg_match ( '/ src ="([^"]+)"/ i' ,
$ attributes, $ matchpaths )) {$ pathimgs [] = $
matchpaths [ 1]; } elseif (preg_match ( '/ src = ([^] +) / i' , $ attributes
, $ matchpaths )) {$ pathimgs [] =
$matchpaths [ 1 ]; } unset( $matchpaths ); } } if ( !empty(
$pathimgs ) ) { if ( $norepetidos ) { return array_unique (
$pathimgs ); } else { return
$pathimgs
; } } else { return
false ; }
} function guarda_imagen ($ img
,
$ name) {$ size
= @
getimagesize ($ img
) if ($ size ! = '') {$ width
= $ size [0 ]
$ high = $ size [
1]; $ thumbnail = imagecreatetruecolor ($ width
, $ high ); switch ($ size [
'mime' ]) { almost 'image / jpeg ' : $ type = . "jpg" ;
$ src_img = imagecreatefromjpeg ($ img
);
imagecopyresampled ( $ thumbnail ,
$ src_img , 0 , 0 , 0
, 0 , $ width, $ high , $ size [0 ] $ size [ 1]); imagejpeg ($ thumbnail , "images /" . $ name. . "jpg" ) break; almost
'image / png' : $ type = . "png" ; $ src_img =
imagecreatefromjpeg ($ img
);
imagecopyresampled ( $ thumbnail, $
src_img , 0, 0 ,
0, 0 , $ width , $ high, $ size [ 0], $ size [ 1]); imagepng ($ thumbnail , "images /" . $ name. . "png" ) break;
case 'image / gif' : $ type = . "gif" ; $ src_img = imagecreatefromgif
(
$ img);
imagecopyresampled ($ thumbnail ,
$ src_img , 0, 0 ,
0, 0 , $ width, $ high , $ size [0 ] $ size [ 1]); imagegif ($ thumbnail , "images /" . $ name. . "Gif" ) break; default:
ImageDestroy ( $ thumbnail) return false;} ImageDestroy (
$ thumbnail) return $ type;} else return false
;}
?> \u0026lt;html> \u0026lt;head> \u0026lt;title> capture images from a URL \u0026lt;/ title> \u0026lt;/ head>
\u0026lt; ; body> \u0026lt;h1> Image Capture \u0026lt;/ h1> \u0026lt;form action = "
\u0026lt;?
php echo $ _SERVER [
'PHP_SELF'
]
?> "method =" post ">
URL: \u0026lt;input type="text" name="url"
value=""/> \u0026lt;input type="submit" name="BOTON"
value="Capturar" /> \u0026lt;/ form> ;
\u0026lt;?
php if ($ _POST [ 'BUTTON' ] == 'Capture' ) {
$ images = @
imagenesHTML
( $ _POST [ 'url' ]); if ($ images ! =
'') {if (! is_dir ( '. / Images' )) mkdir (
"images" ) $ i =
0 ; foreach ($ images as $ image ) {$ img = split
( '/' ,
$ image); if ( count ($ img
) \u0026lt;= 1) {$ url = split (
'/' , $ _POST [ 'url' ]);
$ ori $ image = ; $ image ='' ; $ cap =
count ( $ url) -
1 ; for ($ j =
0 ; $ j \u0026lt;$ limit ; $ j + +)
$ image .= $ url [ $ j]. '/' ; $ image .= $ ori
; } $ ok = guarda_imagen ($ image ,
'imagen_' . $ i); if (
$ ok == false ) echo ' Failed to download image: ' . $ image. '\u0026lt;br/>' ; else {echo
'\u0026lt;img src = "images / imagen_' . $ i . $ ok . '"/>\u0026lt; br /> ' ; $ i + +;}
}}} ?> \u0026lt;/ body> \u0026lt;/ html>
Sunday, January 2, 2011
Subscribe to:
Posts (Atom)