STO v1.0

Zxcoders just realease the version 1.0 of the STO.

Smart Task Organizer is a web and mobile application that enables organize your tasks . " STO is another app for managing diary ? " NO! , the STO is useful for small tasks that do not have specific dates but that teem a particular importance and urgency . (mowing the lawn , washing the car , tidying the garage, ... ) All tasks will be added retrospectively intelligently arranged in order of execution , given its importance / urgency / facility . Briefly , it is this! You can start now to learn more about the app .

PHP Debugger

How to debug your PHP project

It is assumed that the server is installed locally to work (php apache mysql etc ...).

Get Eclipse from here

On Eclipse go to Run -> Debug Configurations
Click new configuration

new configurations image new configurations image

Folder: Server
*Name: php-debugger (can chose another name, of course! :) )
*PHP server - default PHP Web Server
*File: /newProject/index.php
Open configure...
*Debugger: xdebug
*base url: http://localhost
*local web root: /var/www/html/newProject
*OK
*new configurations image

Folder: Debugger
*Server Debuger --> XDebug
APPLY
CLOSE

go to /var/www/html and create a new folder "newProject"

Create a PHP Project in eclipse (using, of course, the folder you created)

Create new file index.php with some code to text and set a breakpoint with double click on the left side of the code

Open php.ini
sudo gedit /etc/php5/apache2/php.ini
past the code

code:
xdebug.remote_enable = On
new configurations image
save the file and exit
restart apache: sudo /etc/init.d/apache2 restart

new configurations image

Run, Debug as... , PHP web application

new configurations image

Will open a web browser inside eclipse

________
ZXCoders

Email Web Crawler


This simple python script allow you to scan websites looking for email addresses.

In the begin, you have to set a seed url to have a initial point to scan

code:
urlsToProcess = deque(['https://moz.com/top500']) 

In the main loop (who runs until there is no more urls) process url looking for more urls to feed the deque urlsToProcess

code:
url = urlsToProcess.popleft()
    processed_urls.add(url)
     
    urlsFile.write(url + "\n")
    
    parts = urlparse(url)
    base_url = "{0.scheme}://{0.netloc}".format(parts)
    path = url[:url.rfind('/')+1] if '/' in parts.path else url
 
    print("Crawling site: %s" % url)
    try:
        response = requests.get(url)
    

for anchor in soup.find_all("a"):
        # extract link
        link = anchor.attrs["href"] if "href" in anchor.attrs else ''
        if link.startswith('/'):
            link = base_url + link
        elif not link.startswith('http'):
            link = path + link
        # add url to the the list
        if not link in urlsToProcess and not link in processed_urls:
            urlsToProcess.append(link)

And scan and save the emails in a file.

code:
new_emails = set(re.findall(r"[a-z0-9\.\-+_]+@[a-z0-9\.\-+_]+\.[a-z]+", response.text, re.I))
    
    for email in new_emails:
        if email not in emails:
            emailsFile.write(email + "\n")
            emails.add(email)

To donwload the full script clone/fork it from bitbucket zxcoders

PHP - Run your python from web

executer print screen

Have you ever need to run some python script's in you server?

If you need to run , and it's helpfull to do it from a web page where is a script to help you.

Is a very simple script just in one php file. Fell free to copy, share, and modify



LINK to BitBucket

Make your icons for android app's

Launcher Icon Generator is a very simple and usefull online app to make your icons to android apps. try it! :)

romannurik.github.io/AndroidAssetStudio/icons-launcher.html

Tags:

Pages

Subscribe to ZXCoders Blog RSS