Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Aug 2nd, 2013, 2:52 PM   #1
origamiguy
Programmer
 
Join Date: Jan 2013
Posts: 55
Rep Power: 5 origamiguy is on a distinguished road
getting https file

i tried :

$inputhtml = file_get_contents('the url that would go into the address bar');

doesn't like it? better ways? and it is username/password protected....

thanks
origamiguy is offline   Reply With Quote
Old Aug 2nd, 2013, 3:05 PM   #2
origamiguy
Programmer
 
Join Date: Jan 2013
Posts: 55
Rep Power: 5 origamiguy is on a distinguished road
Re: getting https file

nevermind.... why do i always get my own answers after posting

sigh
origamiguy is offline   Reply With Quote
Old Aug 2nd, 2013, 4:03 PM   #3
Ancient Dragon
Achieved Level 70

 
Ancient Dragon's Avatar
 
Join Date: Jun 2005
Location: near St Louis, MO. (USA)
Posts: 4,345
Rep Power: 10 Ancient Dragon will become famous soon enoughAncient Dragon will become famous soon enough
Re: getting https file

Don't worry about it -- I've done that too
__________________
PFO's FAQ is here
Forum Rules

There is no cow level (Diablo III)
If you never push yourself you will never improve (Diablo III)
Ancient Dragon is offline   Reply With Quote
Old Aug 10th, 2013, 8:09 AM   #4
origamiguy
Programmer
 
Join Date: Jan 2013
Posts: 55
Rep Power: 5 origamiguy is on a distinguished road
Re: getting https file

Quick question...

i want to check a file name to see if it is compressed. '.gz' to be specific. i use preg match but it wont stop yelling at me

Warning: preg_match(): No ending delimiter '.' found in C:\xampp\htdocs\(files stuff)

is there a better way?
if($fq = mysqli_query($conn,$file_query))
	{
		while($f = mysqli_fetch_array($fq,MYSQL_ASSOC))
		{
			if(file_exists($_SERVER['DOCUMENT_ROOT'].'\file\path\\' . $f['file']))
			{
				echo  $f["file"] . " was found <br>";
				if(preg_match('.gz',$f['file'], $matches))
					echo "this is a .gz file!!! <br>";
			}
			else
			{
				echo $f["file"] . " was NOT found <br>";
			}
		}
	}

Last edited by pritaeas; Aug 10th, 2013 at 12:50 PM. Reason: Code tags.
origamiguy is offline   Reply With Quote
Old Aug 10th, 2013, 12:52 PM   #5
pritaeas
mod_pritaeas
 
Join Date: May 2009
Location: The Netherlands
Posts: 251
Rep Power: 9 pritaeas is on a distinguished road
Re: getting https file

preg_match('/\.gz$/', $f['file'], $matches)
pritaeas is offline   Reply With Quote
Old Aug 10th, 2013, 7:40 PM   #6
origamiguy
Programmer
 
Join Date: Jan 2013
Posts: 55
Rep Power: 5 origamiguy is on a distinguished road
Re: getting https file

thanks. will try it later. anyway search for multiple compression/archive extensions using this one line?
origamiguy is offline   Reply With Quote
Old Aug 11th, 2013, 3:28 AM   #7
pritaeas
mod_pritaeas
 
Join Date: May 2009
Location: The Netherlands
Posts: 251
Rep Power: 9 pritaeas is on a distinguished road
Re: getting https file

Like this:
preg_match('/\.(gz|zip|rar)$/', $f['file'], $matches)
pritaeas is offline   Reply With Quote
Old Aug 11th, 2013, 9:38 AM   #8
origamiguy
Programmer
 
Join Date: Jan 2013
Posts: 55
Rep Power: 5 origamiguy is on a distinguished road
Re: getting https file

thanks. i knew i liked people on here for a reason! hahaha thanks
origamiguy is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Reading data from a text file into a C struct someone2088 C 1 Dec 7th, 2011 8:22 AM
problem processing file into a char array csrocker101 C++ 1 May 8th, 2007 11:50 PM
After execution - Error cannot locate /Skin File? wchar Visual Basic 1 Mar 5th, 2005 9:04 PM
airport Log program using 3D linked List : problem reading from file gemini_shooter C++ 0 Mar 2nd, 2005 4:12 PM
Structure char field to a disk file ehab_aziz2001 C++ 0 Feb 10th, 2005 2:42 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 2:28 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC